From 99d88d60989526c6f3f921d6704e4f2bb5a781ae Mon Sep 17 00:00:00 2001 From: Eusener Castilho Date: Mon, 2 Nov 2026 12:46:31 -0300 Subject: [PATCH 1/2] =?UTF-8?q?feat(catalog):=20Helix=20como=20editor=20pa?= =?UTF-8?q?dr=C3=A3o,=20com=20servidores=20de=20linguagem=20por=20perfil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - helix: configs de IDE (config.toml, languages.toml e tema monokai_soda_ide), EDITOR/VISUAL=hx; entra em todos os perfis. - Nenhuma distro Neovim vem marcada nos perfis; o LazyVim continua opcional, com os extras de linguagem do perfil. - Nova categoria "Servidores de linguagem" (lsp), no wizard junto dos editores: typescript, typescript-language-server, vscode-langservers, tailwindcss-ls, prettier, intelephense, laravel-ls, blade-formatter, gopls, goimports, delve, csharp-ls (fixo na 0.20.0 por causa do .NET 9), rust-analyzer e basedpyright, distribuídos pelos perfis web, laravel, ml e backend. - mise: pacotes go: instalam com GOTOOLCHAIN=auto (gopls exige Go mais novo e distros como o Fedora fixam GOTOOLCHAIN=local). - herdr: plugin herdr-sidebar (v0.15.1) com atalho prefix+f, detecção exige o sidebar, tema gruvbox. - kitty: fonte 12, opacidade 0.90, blur 20. - Teste garante que toda categoria aparece numa página do wizard. --- README.md | 71 ++++++++-- catalog/catalog.yaml | 2 +- catalog/categories/lsp.yaml | 4 + catalog/configs/helix/config.toml | 129 ++++++++++++++++++ catalog/configs/helix/languages.toml | 127 +++++++++++++++++ .../helix/themes/monokai_soda_ide.toml | 13 ++ catalog/configs/herdr/config.toml | 7 +- .../plugins/hhdebb.herdr-radar/config.toml | 2 +- catalog/configs/kitty/kitty.conf | 6 +- catalog/items/basedpyright.yaml | 12 ++ catalog/items/blade-formatter.yaml | 12 ++ catalog/items/csharp-ls.yaml | 15 ++ catalog/items/delve.yaml | 12 ++ catalog/items/goimports.yaml | 11 ++ catalog/items/gopls.yaml | 12 ++ catalog/items/helix.yaml | 23 +++- catalog/items/herdr-plugins.yaml | 7 +- catalog/items/herdr.yaml | 2 +- catalog/items/intelephense.yaml | 11 ++ catalog/items/laravel-ls.yaml | 17 +++ catalog/items/prettier.yaml | 12 ++ catalog/items/rust-analyzer.yaml | 13 ++ catalog/items/tailwindcss-ls.yaml | 11 ++ catalog/items/typescript-language-server.yaml | 12 ++ catalog/items/typescript.yaml | 12 ++ catalog/items/vscode-langservers.yaml | 11 ++ catalog/profiles/backend.yaml | 4 +- catalog/profiles/blank.yaml | 5 +- catalog/profiles/laravel.yaml | 5 +- catalog/profiles/ml.yaml | 3 +- catalog/profiles/web.yaml | 5 +- internal/backend/backend_test.go | 6 + internal/backend/mise.go | 15 +- internal/catalog/embedded_test.go | 57 ++++++++ internal/tui/categories.go | 2 +- internal/tui/selection_test.go | 21 ++- internal/tui/testdata/categories.golden | 4 +- internal/tui/testdata/dashboard.golden | 2 +- internal/tui/testdata/profile.golden | 8 +- internal/tui/testdata/review.golden | 2 +- 40 files changed, 656 insertions(+), 49 deletions(-) create mode 100644 catalog/categories/lsp.yaml create mode 100644 catalog/configs/helix/config.toml create mode 100644 catalog/configs/helix/languages.toml create mode 100644 catalog/configs/helix/themes/monokai_soda_ide.toml create mode 100644 catalog/items/basedpyright.yaml create mode 100644 catalog/items/blade-formatter.yaml create mode 100644 catalog/items/csharp-ls.yaml create mode 100644 catalog/items/delve.yaml create mode 100644 catalog/items/goimports.yaml create mode 100644 catalog/items/gopls.yaml create mode 100644 catalog/items/intelephense.yaml create mode 100644 catalog/items/laravel-ls.yaml create mode 100644 catalog/items/prettier.yaml create mode 100644 catalog/items/rust-analyzer.yaml create mode 100644 catalog/items/tailwindcss-ls.yaml create mode 100644 catalog/items/typescript-language-server.yaml create mode 100644 catalog/items/typescript.yaml create mode 100644 catalog/items/vscode-langservers.yaml diff --git a/README.md b/README.md index a6d58fc..af6401e 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@

Instala e gerencia um ambiente de desenvolvimento focado em terminal: shell, -ferramentas CLI modernas, git, Neovim (LazyVim e outras distribuições), -linguagens, ambiente PHP local (lerd ou Flock), Python/dados, containers e o +ferramentas CLI modernas, git, o editor Helix configurado como IDE (com os +servidores de linguagem de cada perfil), Neovim (LazyVim e outras +distribuições, opcionais), linguagens, ambiente PHP local (lerd ou Flock), Python/dados, containers e o terminal **kitty + herdr**. Tudo vem de um catálogo declarativo (`catalog/`) e de perfis embutidos, com uma TUI para escolher o que instalar e uma CLI completa para scripts. @@ -75,15 +76,18 @@ execução e resumo. Nada é instalado antes da tela de revisão. | Perfil | O que traz | |---|---| -| `blank` | Só a base: shell, ferramentas CLI modernas, git, LazyVim e o terminal | -| `web` | Node, pnpm e Bun, ferramentas de HTTP e tarefas, LazyVim para TypeScript | -| `laravel` | PHP via lerd (Linux) ou Flock (macOS), Composer, Node e LazyVim para PHP | +| `blank` | Só a base: shell, ferramentas CLI modernas, git, Helix e o terminal | +| `web` | Node, pnpm e Bun, ferramentas de HTTP e tarefas, Helix para TypeScript | +| `laravel` | PHP via lerd (Linux) ou Flock (macOS), Composer, Node e Helix para PHP | | `ml` | Python, uv, Ruff, JupyterLab e CUDA quando há GPU NVIDIA | | `backend` | Rust, Go, .NET, Java, Podman e ferramentas de Kubernetes | Todos incluem a base do `blank`. Depois de escolher o perfil, cada categoria pode ser ajustada item a item. Em categorias exclusivas (distribuição do -Neovim, lerd ou Flock, Docker ou Podman) só um item fica marcado. +Neovim, lerd ou Flock, Docker ou Podman) só um item fica marcado. Nenhuma +distribuição do Neovim vem marcada: o editor padrão é o Helix, e o LazyVim (com +os extras de linguagem do perfil) continua disponível na categoria +"Distribuição Neovim". ## CLI @@ -109,7 +113,7 @@ kanivet-cli catalog lint # valida o catálogo arquivo que já existe aparece marcado com `(backup)` e é copiado para `~/.local/state/kanivet-cli/backups//` antes de ser alterado; `kanivet-cli restore ` desfaz. -- **Configs opinativas são opcionais.** Cada config (kitty, herdr, LazyVim...) +- **Configs opinativas são opcionais.** Cada config (kitty, herdr, Helix...) pode ser desmarcada na revisão ou no dashboard. - **Sem sudo à toa.** No macOS as ferramentas vêm do Homebrew; no Linux, do mise (binários no `~`). Só os itens da seção "Precisa de sudo" pedem a senha, uma @@ -178,17 +182,61 @@ Com os itens instalados, o init do shell ativa: ferramentas novas usam flags diferentes e quebrariam scripts. Use `rg`, `fd`, `sd`, `dust`, `duf` e `procs` direto. +## Helix + +O Helix é o editor padrão de todos os perfis e define `EDITOR` e `VISUAL` como +`hx`. As configs (opcionais e com backup) deixam ele com cara de IDE: abas no +topo, statusline completa, diagnósticos e dicas de tipo inline, guias de +indentação, auto-save e formatação ao salvar. O tema é o `monokai_soda_ide` +(monokai_soda com a aba ativa e a linha do cursor destacadas). + +Atalhos incluídos na config (os nativos do Helix continuam valendo): + +| Atalho | Ação | +|---|---| +| `ctrl+s` | salvar (também no modo insert) | +| `ctrl+p` / `ctrl+shift+p` | abrir arquivo / paleta de comandos | +| `ctrl+shift+f` | buscar no projeto | +| `ctrl+e` / `ctrl+y` | explorador de arquivos nativo / yazi | +| `ctrl+b` | lista de buffers | +| `ctrl+g` | lazygit em tela cheia (recarrega os buffers ao sair) | +| `H` / `L` | aba anterior / próxima | +| `ctrl+q` ou `space x` | fechar a aba (`space X` fecha as outras) | +| `F12` / `shift+F12` | ir para a definição / referências | +| `F2` | renomear símbolo | +| `ctrl+.` | code actions | +| `ctrl+space` | hover (no modo insert, autocomplete) | +| `F8` / `shift+F8` | próximo / anterior diagnóstico | +| `alt+↑` / `alt+↓` | mover a linha | +| `space t` / `space W` | liga/desliga dicas de tipo / quebra de linha | +| `space p` | roda o Laravel Pint (`vendor/bin/pint`) no arquivo atual | + +Os servidores de linguagem ficam na categoria "Servidores de linguagem" e são +instalados pelo mise (pacotes `npm:`, `go:`, `pipx:`, `dotnet:` e `github:`), +exceto o rust-analyzer, que é um componente do rustup: + +| Perfil | Servidores e formatadores | +|---|---| +| `web` | typescript-language-server, ESLint/HTML/CSS/JSON (vscode-langservers), Tailwind, prettier | +| `laravel` | intelephense, laravel-ls, blade-formatter e os mesmos do `web` | +| `ml` | basedpyright (o Ruff já vem no perfil) | +| `backend` | rust-analyzer, gopls, goimports, delve, csharp-ls | + +O csharp-ls fica fixo na 0.20.0, a última versão que instala com o SDK do .NET 9. +O laravel-ls não tem release para Linux arm64 e é pulado nessa plataforma. +`hx --health ` mostra o que o Helix encontrou. + ## kitty + herdr As configs opinativas do terminal (todas opcionais e com backup): -- **kitty**: JetBrainsMono Nerd Font 14, abas no topo, fundo translúcido com +- **kitty**: JetBrainsMono Nerd Font 12, abas no topo, fundo translúcido com desfoque, tema Afterglow fixo (claro e escuro), e abas/janelas novas no diretório atual (`cmd+t`, `cmd+enter`, `cmd+n`; no Linux `ctrl+shift+t`, `ctrl+shift+enter`, `ctrl+shift+n`). -- **herdr**: tema vesper, notificações no próprio herdr, atalhos dos plugins e - lazygit em popup. Plugins herdr-bar, herdr-auto-title, herdr-radar e - herdr-reviewr, cada um num commit fixo, mais as integrações dos agentes de IA +- **herdr**: tema gruvbox, notificações no próprio herdr, atalhos dos plugins e + lazygit em popup. Plugins herdr-bar, herdr-auto-title, herdr-radar, + herdr-reviewr e herdr-sidebar, cada um num commit fixo, mais as integrações dos agentes de IA encontrados no `PATH`. O `prefix` do herdr é `ctrl+b`. Atalhos incluídos na config: @@ -206,6 +254,7 @@ O `prefix` do herdr é `ctrl+b`. Atalhos incluídos na config: | Lazygit em popup | `prefix+alt+g` | | Busca rápida (herdr-bar) | `prefix+space` | | Painel de review do diff (reviewr) | `prefix+d` | +| Sidebar estilo VS Code: arquivos, busca e git (herdr-sidebar) | `prefix+f` | | Radar: alternar ativos / recentes | `prefix+a` | | Radar: configurações | `prefix+,` | diff --git a/catalog/catalog.yaml b/catalog/catalog.yaml index bd4c5d8..4a465a9 100644 --- a/catalog/catalog.yaml +++ b/catalog/catalog.yaml @@ -1,3 +1,3 @@ schema: 1 version: "0.1.0" -categories: [terminal, shell, replacements, navigation, git, neovim, editors, languages, php-local, python-data, container-engine, containers, data-apis, managers] +categories: [terminal, shell, replacements, navigation, git, editors, lsp, neovim, languages, php-local, python-data, container-engine, containers, data-apis, managers] diff --git a/catalog/categories/lsp.yaml b/catalog/categories/lsp.yaml new file mode 100644 index 0000000..996be4c --- /dev/null +++ b/catalog/categories/lsp.yaml @@ -0,0 +1,4 @@ +id: lsp +name: {en: "Language servers", pt-BR: "Servidores de linguagem"} +description: {en: "LSPs and formatters used by Helix (and any LSP-aware editor)", pt-BR: "LSPs e formatadores usados pelo Helix (e por qualquer editor com LSP)"} +exclusive: false diff --git a/catalog/configs/helix/config.toml b/catalog/configs/helix/config.toml new file mode 100644 index 0000000..e342388 --- /dev/null +++ b/catalog/configs/helix/config.toml @@ -0,0 +1,129 @@ +theme = "monokai_soda_ide" + +# ───────────────────────────── Editor ───────────────────────────── +[editor] +line-number = "absolute" # números absolutos, como numa IDE +cursorline = true # destaca a linha atual +rulers = [100] # régua vertical na coluna 100 +bufferline = "always" # "abas" de buffers no topo +color-modes = true # cor do modo na statusline +mouse = true # clique, scroll e seleção com o mouse +scrolloff = 8 +true-color = true +undercurl = true # sublinhado ondulado nos erros (kitty suporta) +popup-border = "all" # bordas em popups/menus (hover, completion) +completion-trigger-len = 1 +completion-timeout = 5 +completion-replace = true +idle-timeout = 50 +auto-pairs = true +auto-format = true +trim-trailing-whitespace = true +insert-final-newline = true +end-of-line-diagnostics = "hint" # diagnóstico no fim da linha +gutters = ["diagnostics", "spacer", "line-numbers", "spacer", "diff"] + +[editor.auto-save] +focus-lost = true # salva ao trocar de janela +after-delay.enable = true # e após um tempo sem digitar +after-delay.timeout = 3000 + +[editor.inline-diagnostics] +cursor-line = "warning" # mensagem completa na linha do cursor +other-lines = "disable" + +[editor.cursor-shape] +insert = "bar" +normal = "block" +select = "underline" + +[editor.indent-guides] +render = true +character = "│" +skip-levels = 1 + +[editor.soft-wrap] +enable = false + +[editor.whitespace.render] +tab = "all" +nbsp = "all" +nnbsp = "all" + +[editor.whitespace.characters] +tab = "→" +nbsp = "⍽" + +[editor.file-picker] +hidden = false # mostra dotfiles (respeita .gitignore) +git-ignore = true + +[editor.lsp] +display-inlay-hints = true # tipos/parâmetros inline +display-messages = true +display-progress-messages = true +auto-signature-help = true +snippets = true + +[editor.statusline] +left = ["mode", "spinner", "version-control", "file-name", "read-only-indicator", "file-modification-indicator"] +center = [] +right = ["diagnostics", "workspace-diagnostics", "selections", "register", "position", "position-percentage", "file-encoding", "file-line-ending", "file-type"] +separator = "│" +mode.normal = "NORMAL" +mode.insert = "INSERT" +mode.select = "SELECT" + +# ─────────────────────────── Atalhos ──────────────────────────── +# Estilo VS Code por cima dos atalhos nativos (que continuam valendo). +[keys.normal] +C-s = ":write" # salvar +C-p = "file_picker" # abrir arquivo +C-S-p = "command_palette" # paleta de comandos +C-S-f = "global_search" # buscar no projeto +C-e = "file_explorer" # explorador de arquivos (nativo) +C-b = "buffer_picker" # buffers abertos +F2 = "rename_symbol" +F12 = "goto_definition" +S-F12 = "goto_reference" +"C-." = "code_action" +C-space = "hover" +F8 = "goto_next_diag" +S-F8 = "goto_prev_diag" +H = "goto_previous_buffer" # aba anterior +L = "goto_next_buffer" # próxima aba +C-q = ":buffer-close" # fechar aba +esc = ["collapse_selection", "keep_primary_selection"] + +# Mover linha para cima/baixo (Alt+↑/↓) +A-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"] +A-down = ["extend_to_line_bounds", "delete_selection", "paste_after"] + +# lazygit em tela cheia; recarrega os buffers ao sair +C-g = [":write-all", ":new", ":insert-output lazygit", ":buffer-close!", ":redraw", ":reload-all"] + +# yazi como explorador: abre o arquivo escolhido +C-y = [ + ':sh rm -f /tmp/helix-yazi-chooser', + ':insert-output yazi "%{buffer_name}" --chooser-file=/tmp/helix-yazi-chooser', + ':insert-output echo "\x1b[?1049h\x1b[?2004h" > /dev/tty', + ':open %sh{cat /tmp/helix-yazi-chooser}', + ':redraw', +] + +[keys.normal.space] +x = ":buffer-close" +X = ":buffer-close-others" +q = ":quit-all" +t = ":toggle lsp.display-inlay-hints" +W = ":toggle soft-wrap.enable" +p = [":write", ":sh vendor/bin/pint %{buffer_name}", ":reload"] # Laravel Pint no arquivo atual + +[keys.insert] +C-s = ["normal_mode", ":write"] +C-space = "completion" +A-up = ["normal_mode", "extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before", "insert_mode"] +A-down = ["normal_mode", "extend_to_line_bounds", "delete_selection", "paste_after", "insert_mode"] + +[keys.select] +C-s = ["normal_mode", ":write"] diff --git a/catalog/configs/helix/languages.toml b/catalog/configs/helix/languages.toml new file mode 100644 index 0000000..f6eb046 --- /dev/null +++ b/catalog/configs/helix/languages.toml @@ -0,0 +1,127 @@ +# ─────────────────────── Language servers ─────────────────────── +[language-server.rust-analyzer.config] +check.command = "clippy" # lint com clippy ao salvar +cargo.features = "all" +procMacro.enable = true +inlayHints.bindingModeHints.enable = false +inlayHints.closingBraceHints.minLines = 10 +inlayHints.closureReturnTypeHints.enable = "with_block" +inlayHints.lifetimeElisionHints.enable = "skip_trivial" + +[language-server.basedpyright] +command = "basedpyright-langserver" +args = ["--stdio"] + +[language-server.basedpyright.config.basedpyright.analysis] +typeCheckingMode = "standard" +autoImportCompletions = true +inlayHints.variableTypes = true +inlayHints.functionReturnTypes = true +inlayHints.callArgumentNames = true + +# ─────────────────────────── Linguagens ────────────────────────── +[[language]] +name = "rust" +auto-format = true + +[[language]] +name = "python" +# basedpyright: tipos/goto/hover · ruff: lint + format +language-servers = ["basedpyright", "ruff"] +auto-format = true + +# ═════════════════════ PHP / Laravel ═════════════════════ +# intelephense: autocomplete, definição, hover, diagnósticos +# laravel-ls: rotas, views, config, env e bindings do app() +[language-server.laravel-ls] +command = "laravel-ls" + +[[language]] +name = "php" +language-servers = ["intelephense", "laravel-ls"] +auto-format = false # projetos Laravel usam o Pint: `Space p` roda vendor/bin/pint + +[[language]] +name = "blade" +language-servers = ["laravel-ls", "vscode-html-language-server", "tailwindcss-ls"] +formatter = { command = "blade-formatter", args = ["--stdin"] } +auto-format = true + +# ═════════════════════════ C# ═════════════════════════ +# csharp-ls 0.20: última versão que instala com o SDK do .NET 9 +[language-server.csharp-ls] +command = "csharp-ls" + +[[language]] +name = "c-sharp" +language-servers = ["csharp-ls"] +auto-format = true + +# ═════════════════════════ Go ═════════════════════════ +[language-server.gopls.config] +gofumpt = true +staticcheck = true +usePlaceholders = true +completeUnimported = true +hints = { assignVariableTypes = true, compositeLiteralFields = true, constantValues = true, functionTypeParameters = true, parameterNames = true, rangeVariableTypes = true } + +[[language]] +name = "go" +language-servers = ["gopls"] +auto-format = true +formatter = { command = "goimports" } # format + organize imports + +# ═════════════════ TypeScript / JavaScript ═════════════════ +[language-server.eslint] +command = "vscode-eslint-language-server" +args = ["--stdio"] + +[language-server.eslint.config] +validate = "on" +run = "onType" +format = false +quiet = false +nodePath = "" +onIgnoredFiles = "off" +rulesCustomizations = [] +experimental = {} +problems = { shortenToSingleLine = false } +workingDirectory = { mode = "auto" } +codeAction = { disableRuleComment = { enable = true, location = "separateLine" }, showDocumentation = { enable = true } } + +[language-server.typescript-language-server.config] +preferences = { importModuleSpecifierPreference = "non-relative" } +typescript.inlayHints = { includeInlayParameterNameHints = "all", includeInlayFunctionParameterTypeHints = true, includeInlayVariableTypeHints = true, includeInlayPropertyDeclarationTypeHints = true, includeInlayFunctionLikeReturnTypeHints = true, includeInlayEnumMemberValueHints = true } +javascript.inlayHints = { includeInlayParameterNameHints = "all", includeInlayFunctionParameterTypeHints = true, includeInlayVariableTypeHints = true, includeInlayFunctionLikeReturnTypeHints = true } + +[[language]] +name = "typescript" +language-servers = ["typescript-language-server", "eslint"] +formatter = { command = "prettier", args = ["--stdin-filepath", "%{buffer_name}"] } +auto-format = true + +[[language]] +name = "tsx" +language-servers = ["typescript-language-server", "eslint", "tailwindcss-ls"] +formatter = { command = "prettier", args = ["--stdin-filepath", "%{buffer_name}"] } +auto-format = true + +[[language]] +name = "javascript" +language-servers = ["typescript-language-server", "eslint"] +formatter = { command = "prettier", args = ["--stdin-filepath", "%{buffer_name}"] } +auto-format = true + +[[language]] +name = "jsx" +language-servers = ["typescript-language-server", "eslint", "tailwindcss-ls"] +formatter = { command = "prettier", args = ["--stdin-filepath", "%{buffer_name}"] } +auto-format = true + +[[language]] +name = "html" +language-servers = ["vscode-html-language-server", "tailwindcss-ls"] + +[[language]] +name = "css" +language-servers = ["vscode-css-language-server", "tailwindcss-ls"] diff --git a/catalog/configs/helix/themes/monokai_soda_ide.toml b/catalog/configs/helix/themes/monokai_soda_ide.toml new file mode 100644 index 0000000..1ab1f7a --- /dev/null +++ b/catalog/configs/helix/themes/monokai_soda_ide.toml @@ -0,0 +1,13 @@ +# monokai_soda + ajustes de IDE +inherits = "monokai_soda" + +# Abas (bufferline) +"ui.bufferline" = { fg = "gray", bg = "black" } # abas inativas: apagadas +"ui.bufferline.active" = { fg = "black", bg = "orange", modifiers = ["bold"] } # aba ativa: laranja +"ui.bufferline.background" = { bg = "black" } # fundo da barra + +# Linha do cursor (o tema original não define) +"ui.cursorline.primary" = { bg = "#262626" } + +[palette] +"black" = "#222222" diff --git a/catalog/configs/herdr/config.toml b/catalog/configs/herdr/config.toml index 2db0f51..b3b5398 100644 --- a/catalog/configs/herdr/config.toml +++ b/catalog/configs/herdr/config.toml @@ -23,7 +23,7 @@ delivery = "herdr" position = "top-right" [theme] -name = "vesper" +name = "gruvbox" auto_switch = false [keys] @@ -45,6 +45,11 @@ key = "prefix+d" type = "plugin_action" command = "persiyanov.reviewr.toggle" # painel de review do diff +[[keys.command]] +key = "prefix+f" +type = "plugin_action" +command = "herdr-sidebar.open-sidebar" # sidebar: explorador de arquivos + git + [[keys.command]] key = "prefix+a" type = "plugin_action" diff --git a/catalog/configs/herdr/plugins/hhdebb.herdr-radar/config.toml b/catalog/configs/herdr/plugins/hhdebb.herdr-radar/config.toml index 6d3d5af..7378fb2 100644 --- a/catalog/configs/herdr/plugins/hhdebb.herdr-radar/config.toml +++ b/catalog/configs/herdr/plugins/hhdebb.herdr-radar/config.toml @@ -1,2 +1,2 @@ -# Mantém o tema vesper fixo (não seguir claro/escuro do macOS). +# Mantém o tema gruvbox fixo (não seguir claro/escuro do macOS). follow_appearance = false diff --git a/catalog/configs/kitty/kitty.conf b/catalog/configs/kitty/kitty.conf index 4269104..745efe1 100644 --- a/catalog/configs/kitty/kitty.conf +++ b/catalog/configs/kitty/kitty.conf @@ -5,7 +5,7 @@ font_family family="JetBrainsMono Nerd Font Mono" bold_font auto italic_font auto bold_italic_font auto -font_size 14.0 +font_size 12.0 disable_ligatures never tab_bar_edge top @@ -14,8 +14,8 @@ tab_separator " " tab_title_template " {index}: {title} " tab_bar_margin_height 8 8 -background_opacity 0.85 -background_blur 48 +background_opacity 0.90 +background_blur 20 # Ícones dos agentes de IA (fonte instalada pelo item herdr-icon-font) symbol_map U+E1A0-U+E1BA Herdr Agent Icons Max diff --git a/catalog/items/basedpyright.yaml b/catalog/items/basedpyright.yaml new file mode 100644 index 0000000..6aa8202 --- /dev/null +++ b/catalog/items/basedpyright.yaml @@ -0,0 +1,12 @@ +id: basedpyright +category: lsp +name: "basedpyright" +description: {en: "Python type checker and language server", pt-BR: "Checagem de tipos e servidor de linguagem Python"} +platforms: [macos, linux] +depends_on: [uv] +detect: + command: "basedpyright --version" + version_regex: "basedpyright ([\\d.]+)" +install: + - backend: mise + package: pipx:basedpyright diff --git a/catalog/items/blade-formatter.yaml b/catalog/items/blade-formatter.yaml new file mode 100644 index 0000000..92a2f54 --- /dev/null +++ b/catalog/items/blade-formatter.yaml @@ -0,0 +1,12 @@ +id: blade-formatter +category: lsp +name: "blade-formatter" +description: {en: "Formatter for Laravel Blade templates", pt-BR: "Formatador de templates Blade do Laravel"} +platforms: [macos, linux] +depends_on: [node] +detect: + command: "blade-formatter --version" + version_regex: "([\\d]+\\.[\\d]+\\.[\\d]+)" +install: + - backend: mise + package: npm:blade-formatter diff --git a/catalog/items/csharp-ls.yaml b/catalog/items/csharp-ls.yaml new file mode 100644 index 0000000..63a2f92 --- /dev/null +++ b/catalog/items/csharp-ls.yaml @@ -0,0 +1,15 @@ +id: csharp-ls +category: lsp +name: "csharp-ls" +description: {en: "C# language server", pt-BR: "Servidor de linguagem C#"} +homepage: https://github.com/razzmatazz/csharp-language-server +notes: {en: "Pinned to 0.20.0, the last version that installs with the .NET 9 SDK", pt-BR: "Fixo na 0.20.0, a última versão que instala com o SDK do .NET 9"} +platforms: [macos, linux] +depends_on: [dotnet] +detect: + command: "csharp-ls --version" + version_regex: "([\\d]+\\.[\\d]+\\.[\\d]+)" +install: + - backend: mise + package: dotnet:csharp-ls + version: "0.20.0" diff --git a/catalog/items/delve.yaml b/catalog/items/delve.yaml new file mode 100644 index 0000000..7e83010 --- /dev/null +++ b/catalog/items/delve.yaml @@ -0,0 +1,12 @@ +id: delve +category: lsp +name: "delve" +description: {en: "Go debugger (dlv), also used by Helix", pt-BR: "Debugger de Go (dlv), usado também pelo Helix"} +platforms: [macos, linux] +depends_on: [go] +detect: + command: "dlv version" + version_regex: "Version: ([\\d.]+)" +install: + - backend: mise + package: go:github.com/go-delve/delve/cmd/dlv diff --git a/catalog/items/goimports.yaml b/catalog/items/goimports.yaml new file mode 100644 index 0000000..e37e7d2 --- /dev/null +++ b/catalog/items/goimports.yaml @@ -0,0 +1,11 @@ +id: goimports +category: lsp +name: "goimports" +description: {en: "Go formatter that also organizes imports", pt-BR: "Formatador Go que também organiza os imports"} +platforms: [macos, linux] +depends_on: [go] +detect: + command: "command -v goimports" +install: + - backend: mise + package: go:golang.org/x/tools/cmd/goimports diff --git a/catalog/items/gopls.yaml b/catalog/items/gopls.yaml new file mode 100644 index 0000000..a15dc6a --- /dev/null +++ b/catalog/items/gopls.yaml @@ -0,0 +1,12 @@ +id: gopls +category: lsp +name: "gopls" +description: {en: "Go language server", pt-BR: "Servidor de linguagem Go"} +platforms: [macos, linux] +depends_on: [go] +detect: + command: "gopls version" + version_regex: "gopls v([\\d.]+)" +install: + - backend: mise + package: go:golang.org/x/tools/gopls diff --git a/catalog/items/helix.yaml b/catalog/items/helix.yaml index b266eb2..2d86b69 100644 --- a/catalog/items/helix.yaml +++ b/catalog/items/helix.yaml @@ -1,7 +1,8 @@ id: helix category: editors name: "Helix" -description: {en: "Modal editor with built-in LSP, zero config", pt-BR: "Editor modal com LSP embutido, sem configuração"} +description: {en: "Modal editor with built-in LSP, set up like an IDE (default editor)", pt-BR: "Editor modal com LSP embutido, configurado como IDE (editor padrão)"} +homepage: https://helix-editor.com platforms: [macos, linux] detect: command: "hx --version" @@ -12,3 +13,23 @@ install: when: {os: macos} - backend: mise package: aqua:helix-editor/helix +shell: + guard: hx + env: + EDITOR: hx + VISUAL: hx +configs: + - id: helix-config + description: {en: "IDE layout: tabs, full status line, inline diagnostics and type hints, VS Code-style shortcuts, lazygit (ctrl+g) and yazi (ctrl+y)", pt-BR: "Layout de IDE: abas, statusline completa, diagnósticos e tipos inline, atalhos estilo VS Code, lazygit (ctrl+g) e yazi (ctrl+y)"} + default: true + files: + - template: configs/helix/config.toml + target: "{{.XDG_CONFIG}}/helix/config.toml" + - template: configs/helix/themes/monokai_soda_ide.toml + target: "{{.XDG_CONFIG}}/helix/themes/monokai_soda_ide.toml" + - id: helix-languages + description: {en: "Language servers and format-on-save for Rust, Python, PHP/Laravel, Blade, C#, Go and TS/JS", pt-BR: "Servidores de linguagem e formatação ao salvar para Rust, Python, PHP/Laravel, Blade, C#, Go e TS/JS"} + default: true + files: + - template: configs/helix/languages.toml + target: "{{.XDG_CONFIG}}/helix/languages.toml" diff --git a/catalog/items/herdr-plugins.yaml b/catalog/items/herdr-plugins.yaml index 8a06502..f3e09a1 100644 --- a/catalog/items/herdr-plugins.yaml +++ b/catalog/items/herdr-plugins.yaml @@ -1,12 +1,12 @@ id: herdr-plugins category: terminal name: herdr plugins -description: {en: "herdr-bar, auto-title, radar and reviewr, plus integrations for the AI agents found", pt-BR: "herdr-bar, auto-title, radar e reviewr, mais as integrações dos agentes de IA encontrados"} +description: {en: "herdr-bar, auto-title, radar, reviewr and sidebar, plus integrations for the AI agents found", pt-BR: "herdr-bar, auto-title, radar, reviewr e sidebar, mais as integrações dos agentes de IA encontrados"} platforms: [macos, linux] requires: {graphical: true} depends_on: [herdr, go, node] detect: - command: 'grep -q herdr-bar "$HOME/.config/herdr/plugins.json" 2>/dev/null' + command: 'grep -q herdr-bar "$HOME/.config/herdr/plugins.json" 2>/dev/null && grep -q herdr-sidebar "$HOME/.config/herdr/plugins.json" 2>/dev/null' install: - backend: herdr-plugin args: @@ -14,6 +14,7 @@ install: - herdr.auto-title=kryptamine/herdr-auto-title@8a43d5503146d835ca223cd1f408840ee68465dd - hhdebb.herdr-radar=hhdebb/herdr-radar@79a81bbddc017a4349713e282b1a01ee360c46de - persiyanov.reviewr=persiyanov/herdr-reviewr@a253b1bfe4b34182af3204b7fcc42ccfed1b87d9 + - herdr-sidebar=alexarthurs/herdr-sidebar/plugins/herdr-sidebar@db78187ea7a965ab7e82ba555a7c932b2bf59919 # v0.15.1 post_install: - | for spec in claude:claude codex:codex copilot:copilot droid:droid opencode:opencode cursor:cursor-agent cursor:cursor antigravity-cli:antigravity-cli; do @@ -23,7 +24,7 @@ post_install: herdr server reload-config >/dev/null 2>&1 || true configs: - id: herdr-radar-config - description: {en: "herdr-radar keeps the vesper theme fixed instead of following the system appearance", pt-BR: "herdr-radar mantém o tema vesper fixo, sem seguir o modo claro/escuro do sistema"} + description: {en: "herdr-radar keeps the gruvbox theme fixed instead of following the system appearance", pt-BR: "herdr-radar mantém o tema gruvbox fixo, sem seguir o modo claro/escuro do sistema"} default: true files: - template: configs/herdr/plugins/hhdebb.herdr-radar/config.toml diff --git a/catalog/items/herdr.yaml b/catalog/items/herdr.yaml index be4992e..1f9fe84 100644 --- a/catalog/items/herdr.yaml +++ b/catalog/items/herdr.yaml @@ -13,7 +13,7 @@ install: url: https://herdr.dev/install.sh configs: - id: herdr-config - description: {en: "Vesper theme, in-app toasts, plugin shortcuts and lazygit popup", pt-BR: "Tema vesper, notificações no próprio herdr, atalhos dos plugins e popup do lazygit"} + description: {en: "Gruvbox theme, in-app toasts, plugin shortcuts and lazygit popup", pt-BR: "Tema gruvbox, notificações no próprio herdr, atalhos dos plugins e popup do lazygit"} default: true files: - template: configs/herdr/config.toml diff --git a/catalog/items/intelephense.yaml b/catalog/items/intelephense.yaml new file mode 100644 index 0000000..f88d9de --- /dev/null +++ b/catalog/items/intelephense.yaml @@ -0,0 +1,11 @@ +id: intelephense +category: lsp +name: "intelephense" +description: {en: "PHP language server", pt-BR: "Servidor de linguagem PHP"} +platforms: [macos, linux] +depends_on: [node] +detect: + command: "command -v intelephense" +install: + - backend: mise + package: npm:intelephense diff --git a/catalog/items/laravel-ls.yaml b/catalog/items/laravel-ls.yaml new file mode 100644 index 0000000..1eb63f2 --- /dev/null +++ b/catalog/items/laravel-ls.yaml @@ -0,0 +1,17 @@ +id: laravel-ls +category: lsp +name: "laravel-ls" +description: {en: "Laravel language server: routes, views, config, env and app() bindings", pt-BR: "Servidor de linguagem do Laravel: rotas, views, config, env e bindings do app()"} +homepage: https://github.com/laravel-ls/laravel-ls +platforms: [macos, linux] +notes: {en: "No release for Linux arm64", pt-BR: "Sem release para Linux arm64"} +detect: + command: "laravel-ls --version" + version_regex: "([\\d]+\\.[\\d]+\\.[\\d]+)" +install: + - backend: mise + package: github:laravel-ls/laravel-ls + when: {os: macos} + - backend: mise + package: github:laravel-ls/laravel-ls + when: {os: linux, arch: amd64} diff --git a/catalog/items/prettier.yaml b/catalog/items/prettier.yaml new file mode 100644 index 0000000..a89ee91 --- /dev/null +++ b/catalog/items/prettier.yaml @@ -0,0 +1,12 @@ +id: prettier +category: lsp +name: "prettier" +description: {en: "Formatter for TS/JS, CSS, JSON and Markdown", pt-BR: "Formatador de TS/JS, CSS, JSON e Markdown"} +platforms: [macos, linux] +depends_on: [node] +detect: + command: "prettier --version" + version_regex: "([\\d]+\\.[\\d]+\\.[\\d]+)" +install: + - backend: mise + package: npm:prettier diff --git a/catalog/items/rust-analyzer.yaml b/catalog/items/rust-analyzer.yaml new file mode 100644 index 0000000..99275d4 --- /dev/null +++ b/catalog/items/rust-analyzer.yaml @@ -0,0 +1,13 @@ +id: rust-analyzer +category: lsp +name: "rust-analyzer" +description: {en: "Rust language server (rustup component, with rust-src)", pt-BR: "Servidor de linguagem Rust (componente do rustup, com rust-src)"} +homepage: https://rust-analyzer.github.io +platforms: [macos, linux] +depends_on: [rust] +detect: + command: "rust-analyzer --version" + version_regex: "rust-analyzer ([\\d.]+)" +install: + - backend: script + inline: '. "$HOME/.cargo/env" 2>/dev/null; rustup component add rust-analyzer rust-src' diff --git a/catalog/items/tailwindcss-ls.yaml b/catalog/items/tailwindcss-ls.yaml new file mode 100644 index 0000000..ba5ab36 --- /dev/null +++ b/catalog/items/tailwindcss-ls.yaml @@ -0,0 +1,11 @@ +id: tailwindcss-ls +category: lsp +name: "tailwindcss-ls" +description: {en: "Tailwind CSS class completion and hover", pt-BR: "Autocomplete e hover das classes do Tailwind CSS"} +platforms: [macos, linux] +depends_on: [node] +detect: + command: "command -v tailwindcss-language-server" +install: + - backend: mise + package: npm:@tailwindcss/language-server diff --git a/catalog/items/typescript-language-server.yaml b/catalog/items/typescript-language-server.yaml new file mode 100644 index 0000000..adb1899 --- /dev/null +++ b/catalog/items/typescript-language-server.yaml @@ -0,0 +1,12 @@ +id: typescript-language-server +category: lsp +name: "typescript-language-server" +description: {en: "TypeScript/JavaScript language server", pt-BR: "Servidor de linguagem TypeScript/JavaScript"} +platforms: [macos, linux] +depends_on: [node, typescript] +detect: + command: "typescript-language-server --version" + version_regex: "([\\d]+\\.[\\d]+\\.[\\d]+)" +install: + - backend: mise + package: npm:typescript-language-server diff --git a/catalog/items/typescript.yaml b/catalog/items/typescript.yaml new file mode 100644 index 0000000..a09f7f7 --- /dev/null +++ b/catalog/items/typescript.yaml @@ -0,0 +1,12 @@ +id: typescript +category: lsp +name: "typescript" +description: {en: "TypeScript compiler (tsc), used by typescript-language-server", pt-BR: "Compilador TypeScript (tsc), usado pelo typescript-language-server"} +platforms: [macos, linux] +depends_on: [node] +detect: + command: "tsc --version" + version_regex: "Version ([\\d.]+)" +install: + - backend: mise + package: npm:typescript diff --git a/catalog/items/vscode-langservers.yaml b/catalog/items/vscode-langservers.yaml new file mode 100644 index 0000000..88b7b3e --- /dev/null +++ b/catalog/items/vscode-langservers.yaml @@ -0,0 +1,11 @@ +id: vscode-langservers +category: lsp +name: "vscode-langservers" +description: {en: "HTML, CSS, JSON and ESLint language servers from VS Code", pt-BR: "Servidores de linguagem HTML, CSS, JSON e ESLint do VS Code"} +platforms: [macos, linux] +depends_on: [node] +detect: + command: "command -v vscode-html-language-server" +install: + - backend: mise + package: npm:vscode-langservers-extracted diff --git a/catalog/profiles/backend.yaml b/catalog/profiles/backend.yaml index cf93137..06c4749 100644 --- a/catalog/profiles/backend.yaml +++ b/catalog/profiles/backend.yaml @@ -1,7 +1,7 @@ id: backend name: {en: "Backend / Systems", pt-BR: "Backend / Sistemas"} description: {en: "Rust, Go, .NET, Java, Podman and Kubernetes tools", pt-BR: "Rust, Go, .NET, Java, Podman e ferramentas de Kubernetes"} -items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, rust, go, dotnet, java, kubectl, k9s, lazydocker, just] -exclusive: {neovim: lazyvim, container-engine: podman} +items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, helix, rust, go, dotnet, java, kubectl, k9s, lazydocker, just, rust-analyzer, gopls, goimports, delve, csharp-ls] +exclusive: {container-engine: podman} extras: lazyvim: [lang.rust, lang.go, lang.omnisharp, lang.java, lang.docker] diff --git a/catalog/profiles/blank.yaml b/catalog/profiles/blank.yaml index fb9f00c..37c20a3 100644 --- a/catalog/profiles/blank.yaml +++ b/catalog/profiles/blank.yaml @@ -1,5 +1,4 @@ id: blank name: {en: "Start from scratch", pt-BR: "Começar do zero"} -description: {en: "Only the base: shell, modern CLI tools, git, LazyVim and the terminal", pt-BR: "Só a base: shell, ferramentas CLI modernas, git, LazyVim e o terminal"} -items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font] -exclusive: {neovim: lazyvim} +description: {en: "Only the base: shell, modern CLI tools, git, Helix and the terminal", pt-BR: "Só a base: shell, ferramentas CLI modernas, git, Helix e o terminal"} +items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, helix] diff --git a/catalog/profiles/laravel.yaml b/catalog/profiles/laravel.yaml index e2f949a..fe3ba9a 100644 --- a/catalog/profiles/laravel.yaml +++ b/catalog/profiles/laravel.yaml @@ -1,8 +1,7 @@ id: laravel name: {en: "Laravel / PHP", pt-BR: "Laravel / PHP"} -description: {en: "PHP via lerd (Linux) or Flock (macOS), Composer, Node and LazyVim for PHP", pt-BR: "PHP via lerd (Linux) ou Flock (macOS), Composer, Node e LazyVim para PHP"} -items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, php, composer, node, pnpm, lazydocker] -exclusive: {neovim: lazyvim} +description: {en: "PHP via lerd (Linux) or Flock (macOS), Composer, Node and Helix for PHP", pt-BR: "PHP via lerd (Linux) ou Flock (macOS), Composer, Node e Helix para PHP"} +items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, helix, php, composer, node, pnpm, lazydocker, intelephense, laravel-ls, blade-formatter, typescript, typescript-language-server, vscode-langservers, tailwindcss-ls, prettier] exclusive_by_os: macos: {php-local: flock} linux: {php-local: lerd} diff --git a/catalog/profiles/ml.yaml b/catalog/profiles/ml.yaml index b697e7e..f7f6116 100644 --- a/catalog/profiles/ml.yaml +++ b/catalog/profiles/ml.yaml @@ -1,7 +1,6 @@ id: ml name: {en: "Machine Learning / Data", pt-BR: "Machine Learning / Dados"} description: {en: "Python, uv, Ruff, JupyterLab and CUDA when there is an NVIDIA GPU", pt-BR: "Python, uv, Ruff, JupyterLab e CUDA quando há GPU NVIDIA"} -items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, python, uv, ruff, jupyter, cuda, yq] -exclusive: {neovim: lazyvim} +items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, helix, python, uv, ruff, jupyter, cuda, yq, basedpyright] extras: lazyvim: [lang.python, lang.json, lang.yaml] diff --git a/catalog/profiles/web.yaml b/catalog/profiles/web.yaml index 65fa39e..26563e7 100644 --- a/catalog/profiles/web.yaml +++ b/catalog/profiles/web.yaml @@ -1,7 +1,6 @@ id: web name: {en: "Web (JS/TS)", pt-BR: "Web (JS/TS)"} -description: {en: "Node, pnpm and Bun, HTTP and task tools, LazyVim for TypeScript", pt-BR: "Node, pnpm e Bun, ferramentas de HTTP e tarefas, LazyVim para TypeScript"} -items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, node, pnpm, bun, xh, just, watchexec] -exclusive: {neovim: lazyvim} +description: {en: "Node, pnpm and Bun, HTTP and task tools, Helix for TypeScript", pt-BR: "Node, pnpm e Bun, ferramentas de HTTP e tarefas, Helix para TypeScript"} +items: [starship, zsh-autosuggestions, zsh-syntax-highlighting, direnv, atuin, zoxide, fzf, eza, bat, fd, ripgrep, dust, duf, btop, procs, sd, yazi, lazygit, delta, gh, jq, kitty, herdr, herdr-plugins, nerd-font-jetbrains, herdr-icon-font, helix, node, pnpm, bun, xh, just, watchexec, typescript, typescript-language-server, vscode-langservers, tailwindcss-ls, prettier] extras: lazyvim: [lang.typescript, lang.tailwind, lang.json] diff --git a/internal/backend/backend_test.go b/internal/backend/backend_test.go index 8dcaebf..959e9ea 100644 --- a/internal/backend/backend_test.go +++ b/internal/backend/backend_test.go @@ -65,6 +65,12 @@ func TestMise(t *testing.T) { eq(t, "latest", b.Install(catalog.Method{Package: "aqua:junegunn/fzf"}, "", ubuntu), "mise use -g aqua:junegunn/fzf@latest") eq(t, "update", b.Update(m, ubuntu), "mise upgrade node") eq(t, "uninstall", b.Uninstall(m, ubuntu), "mise uninstall --all node", "mise unuse -g node") + if env := b.Install(catalog.Method{Package: "go:golang.org/x/tools/gopls"}, "", ubuntu)[0].Env; len(env) != 1 || env[0] != "GOTOOLCHAIN=auto" { + t.Fatalf("go: packages need GOTOOLCHAIN=auto, got %v", env) + } + if env := b.Install(m, "", ubuntu)[0].Env; len(env) != 0 { + t.Fatalf("only go: packages get GOTOOLCHAIN, got %v", env) + } if b.Install(m, "", ubuntu)[0].Lock != "mise" { t.Fatal("mise lock") } diff --git a/internal/backend/mise.go b/internal/backend/mise.go index 0825c13..7e542c9 100644 --- a/internal/backend/mise.go +++ b/internal/backend/mise.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "io" + "strings" "github.com/eusener/kanivet-cli/internal/catalog" "github.com/eusener/kanivet-cli/internal/platform" @@ -23,11 +24,21 @@ func (mise) Install(m catalog.Method, version string, _ platform.Platform) []run if version == "" { version = "latest" } - return []runner.Cmd{argv("mise", "mise", "use", "-g", m.Package+"@"+version)} + return []runner.Cmd{withGoToolchain(m, argv("mise", "mise", "use", "-g", m.Package+"@"+version))} } func (mise) Update(m catalog.Method, _ platform.Platform) []runner.Cmd { - return []runner.Cmd{argv("mise", "mise", "upgrade", m.Package)} + return []runner.Cmd{withGoToolchain(m, argv("mise", "mise", "upgrade", m.Package))} +} + +// withGoToolchain deixa o `go install` dos pacotes go: baixar a toolchain que a ferramenta +// exige (gopls pede Go mais novo que o do catálogo). Distros como o Fedora fixam +// GOTOOLCHAIN=local no Go do sistema, e aí a instalação falharia. +func withGoToolchain(m catalog.Method, c runner.Cmd) runner.Cmd { + if strings.HasPrefix(m.Package, "go:") { + c.Env = append(c.Env, "GOTOOLCHAIN=auto") + } + return c } func (mise) Uninstall(m catalog.Method, _ platform.Platform) []runner.Cmd { diff --git a/internal/catalog/embedded_test.go b/internal/catalog/embedded_test.go index 2400e9a..4f12a5f 100644 --- a/internal/catalog/embedded_test.go +++ b/internal/catalog/embedded_test.go @@ -7,6 +7,7 @@ import ( "github.com/eusener/kanivet-cli/internal/backend" "github.com/eusener/kanivet-cli/internal/catalog" + "github.com/eusener/kanivet-cli/internal/configs" "github.com/eusener/kanivet-cli/internal/detect" "github.com/eusener/kanivet-cli/internal/plan" "github.com/eusener/kanivet-cli/internal/platform" @@ -45,6 +46,8 @@ var moreItems = []string{ "node", "pnpm", "bun", "python", "go", "rust", "dotnet", "java", "php", "composer", "homebrew", "lerd", "flock", "uv", "ruff", "jupyter", "cuda", "podman", "docker", "lazydocker", "k9s", "kubectl", "neovim-bin", "helix", "zed", "vscode", "lazyvim", "astronvim", "nvchad", "kickstart", "neovim-plain", + "typescript", "typescript-language-server", "vscode-langservers", "tailwindcss-ls", "prettier", "intelephense", + "blade-formatter", "laravel-ls", "gopls", "goimports", "delve", "csharp-ls", "rust-analyzer", "basedpyright", } var ( @@ -181,3 +184,57 @@ func TestEmbeddedLanguageVersions(t *testing.T) { } } } + +// Helix é o editor padrão: entra em todos os perfis com as configs, e nenhuma distro Neovim vem marcada. +func TestHelixIsDefaultEditor(t *testing.T) { + lsps := map[string][]string{ + "blank": nil, + "web": {"typescript", "typescript-language-server", "vscode-langservers", "tailwindcss-ls", "prettier"}, + "laravel": {"intelephense", "laravel-ls", "blade-formatter", "typescript-language-server", "vscode-langservers", "tailwindcss-ls", "prettier"}, + "ml": {"basedpyright"}, + "backend": {"rust-analyzer", "gopls", "goimports", "delve", "csharp-ls"}, + } + for profile, want := range lsps { + pl := planFor(t, linuxSystemd, profile) + for _, id := range []string{"install:helix", "config:helix-config", "config:helix-languages"} { + if !hasStep(pl, id) { + t.Errorf("%s: missing %s in %v", profile, id, stepIDs(pl)) + } + } + for _, id := range []string{"lazyvim", "astronvim", "nvchad", "kickstart", "neovim-plain", "neovim-bin"} { + if hasStep(pl, "install:"+id) { + t.Errorf("%s: %s should not be preselected", profile, id) + } + } + for _, id := range want { + if !hasStep(pl, "install:"+id) { + t.Errorf("%s: missing install:%s", profile, id) + } + } + } +} + +func TestHelixConfigsRender(t *testing.T) { + c := embedded(t) + v := configs.VarsFor(linuxSystemd, map[string]string{}) + for _, cfg := range c.Items["helix"].Configs { + for _, f := range cfg.Files { + out, err := configs.Render(c.Files, f.Template, v) + if err != nil { + t.Fatalf("%s: %v", f.Template, err) + } + if strings.Contains(string(out), "/home/") { + t.Errorf("%s: absolute home path in template", f.Template) + } + } + } +} + +func TestLaravelLSUnsupportedOnLinuxARM(t *testing.T) { + arm := linuxSystemd + arm.Arch = "arm64" + pl := planFor(t, arm, "laravel") + if hasStep(pl, "install:laravel-ls") || !hasStep(pl, "install:intelephense") { + t.Fatalf("steps: %v", stepIDs(pl)) + } +} diff --git a/internal/tui/categories.go b/internal/tui/categories.go index 23f84fc..6d1363d 100644 --- a/internal/tui/categories.go +++ b/internal/tui/categories.go @@ -12,7 +12,7 @@ import ( var categoryPages = [][]string{ {"terminal", "shell"}, {"replacements", "navigation", "git", "data-apis"}, - {"neovim", "editors"}, + {"editors", "lsp", "neovim"}, {"languages", "php-local", "python-data"}, {"container-engine", "containers"}, } diff --git a/internal/tui/selection_test.go b/internal/tui/selection_test.go index 09b3bc8..0292e32 100644 --- a/internal/tui/selection_test.go +++ b/internal/tui/selection_test.go @@ -173,8 +173,23 @@ func TestDashboardApplyProfileKeepsMarkedExclusive(t *testing.T) { } // sem nada marcado na categoria, a exclusiva do perfil entra normalmente s = newSel(t, linuxSystemd, nil, ModeDashboard) - s.ApplyProfile("web") - if !s.Marked("lazyvim") { - t.Fatal("categoria vazia: lazyvim deveria ser marcado") + s.ApplyProfile("laravel") + if !s.Marked("lerd") { + t.Fatal("categoria vazia: lerd deveria ser marcado") + } +} + +// Toda categoria do catálogo aparece numa página do wizard (managers entra só como dependência). +func TestEveryCategoryHasWizardPage(t *testing.T) { + onPage := map[string]bool{} + for _, page := range categoryPages { + for _, cat := range page { + onPage[cat] = true + } + } + for _, cat := range emb(t).Categories { + if cat.ID != "managers" && !onPage[cat.ID] { + t.Errorf("categoria %q fora das páginas do wizard", cat.ID) + } } } diff --git a/internal/tui/testdata/categories.golden b/internal/tui/testdata/categories.golden index 8ca0f10..fa9d471 100644 --- a/internal/tui/testdata/categories.golden +++ b/internal/tui/testdata/categories.golden @@ -14,7 +14,7 @@ │ [x] atuin [MISE] [NEW] │ │ │ │ [x] direnv [MISE] [NEW] │ │ STATUS [ ] not installed │ │ [x] fzf [MISE] [NEW] │ │ METHOD script │ - │ [x] starship [MISE] [NEW] │ │ [x] Vesper theme, in-app toasts, │ + │ [x] starship [MISE] [NEW] │ │ [x] Gruvbox theme, in-app toasts, │ │ [x] zoxide [MISE] [NEW] │ │ plugin shortcuts and lazygit popup │ │ [ ] zsh [SYSTEM] │ │ │ │ [x] zsh-autosuggestions [GIT] [NEW] │ │ │ @@ -27,4 +27,4 @@ │ │ │ │ │ │ │ │ └───────────────────────────────────────────────────┘ └───────────────────────────────────────┘ - [33 TO INSTALL] [6 CONFIGS] ←/H left / search ENTER confirm ESC back ? help Q quit + [41 TO INSTALL] [6 CONFIGS] ←/H left / search ENTER confirm ESC back ? help Q quit diff --git a/internal/tui/testdata/dashboard.golden b/internal/tui/testdata/dashboard.golden index e58a5f5..0d2164d 100644 --- a/internal/tui/testdata/dashboard.golden +++ b/internal/tui/testdata/dashboard.golden @@ -3,7 +3,7 @@ └──────────────────────────────────────────────────────────────────────────────────────────────┘ - TERMINAL SHELL [MODERN REPLACEMENTS] NAVIGATION GIT NEOVIM DISTRIBUTION EDITORS … + TERMINAL SHELL [MODERN REPLACEMENTS] NAVIGATION GIT EDITORS LANGUAGE SERVERS … ┌───────────────────────────────────────────────────┐ ┌───────────────────────────────────────┐ │ [x] BAT 1.0 [UP TO DATE] │ │ BAT │ │ [ ] btop [UNAVAILABLE] │ │ github.com/sharkdp/bat │ diff --git a/internal/tui/testdata/profile.golden b/internal/tui/testdata/profile.golden index f5a44f5..5b7ca26 100644 --- a/internal/tui/testdata/profile.golden +++ b/internal/tui/testdata/profile.golden @@ -8,18 +8,18 @@ ┌─────────────────────────────────────────────┐ ┌─────────────────────────────────────────────┐ │ (•) LARAVEL / PHP │ │ ( ) WEB (JS/TS) │ │ PHP via lerd (Linux) or Flock (macOS), │ │ Node, pnpm and Bun, HTTP and task tools, │ - │ Composer, Node and LazyVim for PHP │ │ LazyVim for TypeScript │ - │ [33 ITEMS] │ │ [33 ITEMS] │ + │ Composer, Node and Helix for PHP │ │ Helix for TypeScript │ + │ [41 ITEMS] │ │ [38 ITEMS] │ └─────────────────────────────────────────────┘ └─────────────────────────────────────────────┘ ┌─────────────────────────────────────────────┐ ┌─────────────────────────────────────────────┐ │ ( ) MACHINE LEARNING / DATA │ │ ( ) BACKEND / SYSTEMS │ │ Python, uv, Ruff, JupyterLab and CUDA when │ │ Rust, Go, .NET, Java, Podman and Kubernetes │ │ there is an NVIDIA GPU │ │ tools │ - │ [33 ITEMS] │ │ [36 ITEMS] │ + │ [34 ITEMS] │ │ [41 ITEMS] │ └─────────────────────────────────────────────┘ └─────────────────────────────────────────────┘ - ( ) START FROM SCRATCH Only the base: shell, modern CLI tools, git, LazyVim and the terminal + ( ) START FROM SCRATCH Only the base: shell, modern CLI tools, git, Helix and the terminal diff --git a/internal/tui/testdata/review.golden b/internal/tui/testdata/review.golden index b07b6c1..85519f3 100644 --- a/internal/tui/testdata/review.golden +++ b/internal/tui/testdata/review.golden @@ -2,7 +2,7 @@ │ [KANIVET] x WELCOME x PROFILE x ITEMS [REVIEW] INSTALL 4/5 │ └──────────────────────────────────────────────────────────────────────────┘ - REVIEW THE PLAN [31 INSTALL] [7 CONFIGS] + REVIEW THE PLAN [30 INSTALL] [7 CONFIGS] ┌──────────────────────────────────────────────────────────────────────────┐ │> [INSTALL] │ │ install:mise (script) — dependency of starship │ From 6a0394d859364c03fe6eb8aa27bd1eb12839b3e2 Mon Sep 17 00:00:00 2001 From: Eusener Castilho Date: Mon, 2 Nov 2026 17:33:20 -0300 Subject: [PATCH 2/2] feat(catalog): terminal no Helix (ctrl+t), abas e opacidade do kitty, template do herdr sem bloco aberto --- catalog/configs/helix/config.toml | 11 +++++++++++ catalog/configs/herdr/config.toml | 2 -- catalog/configs/kitty/kitty.conf | 7 +++---- catalog/items/helix.yaml | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/catalog/configs/helix/config.toml b/catalog/configs/helix/config.toml index e342388..dadb7ff 100644 --- a/catalog/configs/helix/config.toml +++ b/catalog/configs/helix/config.toml @@ -102,6 +102,17 @@ A-down = ["extend_to_line_bounds", "delete_selection", "paste_after"] # lazygit em tela cheia; recarrega os buffers ao sair C-g = [":write-all", ":new", ":insert-output lazygit", ":buffer-close!", ":redraw", ":reload-all"] +# terminal (shell) em tela cheia; `exit` ou Ctrl+D volta ao Helix e recarrega os buffers +C-t = [ + ":write-all", + ":new", + ':insert-output printf "\x1b[2J\x1b[H" > /dev/tty; $SHELL -i < /dev/tty > /dev/tty 2>&1', + ':insert-output echo "\x1b[?1049h\x1b[?2004h" > /dev/tty', + ":buffer-close!", + ":redraw", + ":reload-all", +] + # yazi como explorador: abre o arquivo escolhido C-y = [ ':sh rm -f /tmp/helix-yazi-chooser', diff --git a/catalog/configs/herdr/config.toml b/catalog/configs/herdr/config.toml index b3b5398..eb06ebe 100644 --- a/catalog/configs/herdr/config.toml +++ b/catalog/configs/herdr/config.toml @@ -62,5 +62,3 @@ command = "hhdebb.herdr-radar.settings" # configurações do radar [experimental] pane_history = true - -# >>> herdr-radar sidebar block diff --git a/catalog/configs/kitty/kitty.conf b/catalog/configs/kitty/kitty.conf index 745efe1..794a565 100644 --- a/catalog/configs/kitty/kitty.conf +++ b/catalog/configs/kitty/kitty.conf @@ -9,12 +9,11 @@ font_size 12.0 disable_ligatures never tab_bar_edge top -tab_bar_style separator -tab_separator " " +tab_bar_style fade tab_title_template " {index}: {title} " -tab_bar_margin_height 8 8 +tab_bar_margin_height 2 2 -background_opacity 0.90 +background_opacity 0.80 background_blur 20 # Ícones dos agentes de IA (fonte instalada pelo item herdr-icon-font) diff --git a/catalog/items/helix.yaml b/catalog/items/helix.yaml index 2d86b69..14c5a5f 100644 --- a/catalog/items/helix.yaml +++ b/catalog/items/helix.yaml @@ -20,7 +20,7 @@ shell: VISUAL: hx configs: - id: helix-config - description: {en: "IDE layout: tabs, full status line, inline diagnostics and type hints, VS Code-style shortcuts, lazygit (ctrl+g) and yazi (ctrl+y)", pt-BR: "Layout de IDE: abas, statusline completa, diagnósticos e tipos inline, atalhos estilo VS Code, lazygit (ctrl+g) e yazi (ctrl+y)"} + description: {en: "IDE layout: tabs, full status line, inline diagnostics and type hints, VS Code-style shortcuts, lazygit (ctrl+g), terminal (ctrl+t) and yazi (ctrl+y)", pt-BR: "Layout de IDE: abas, statusline completa, diagnósticos e tipos inline, atalhos estilo VS Code, lazygit (ctrl+g), terminal (ctrl+t) e yazi (ctrl+y)"} default: true files: - template: configs/helix/config.toml