diff --git a/config.el b/config.el index bc2c617..60b5b36 100644 --- a/config.el +++ b/config.el @@ -60,8 +60,14 @@ ;; at least once per installation or while changing this list (treesit-language-source-alist '((heex "https://github.com/phoenixframework/tree-sitter-heex") - (elixir "https://github.com/elixir-lang/tree-sitter-elixir"))) + (elixir "https://github.com/elixir-lang/tree-sitter-elixir") + ((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") + (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")))) +;; Install grammars if not present +(dolist (lang '(typescript tsx)) + (unless (treesit-language-available-p lang) + (treesit-install-language-grammar lang))) (major-mode-remap-alist '((elixir-mode . elixir-ts-mode))) ) @@ -332,9 +338,9 @@ ;; Do not use chatgpt as default. took long to find. (setq-default gptel-model 'Qwen3-30B-A3B-Thinking-2507-Q6_K.gguf) (require 'gptel-integrations) ;; <- for mcp - ;; declare another llm configuration, I also use Ollama to easily use multiple smaller models that don't require + ;; declare another llm configuration, 11434 is for llmacpp. I also use ollama fore smaller models that don't require ;; max speed or the latest API. - (gptel-make-ollama "Ollama" + (gptel-make-ollama "Ollama" :host "localhost:11434" :stream t @@ -344,7 +350,17 @@ :description "qwen2.5 coder 32b: large coding model " :capabilities (tools media) - :mime-types ("image/jpeg" "image/png" "image/svg"))))) + :mime-types ("image/jpeg" "image/png" "image/svg")))) + + (gptel-make-preset 'explain + :system "Explain what this code does to a novice programmer." + :model 'Qwen3-Coder-30B-A3B-Instruct-Q6_K.gguf + :backend "llama.cpp") + (gptel-make-preset 'elixir + :system "You are an expert programmer, specialising in Elixir and TDD, you live in Emacs" + :model 'Qwen3-Coder-30B-A3B-Instruct-Q6_K.gguf + :backend "llama.cpp") +) ;; org-roam v1 port to v2, insert node without opening buffer diff --git a/init.el b/init.el index cd35c29..bc77519 100644 --- a/init.el +++ b/init.el @@ -80,7 +80,7 @@ ;;eshell ; the elisp shell that works everywhere ;;shell ; simple shell REPL for Emacs ;;term ; basic terminal emulator for Emacs - ;; vterm ; the best terminal emulation in Emacs + vterm ; the best terminal emulation in Emacs :checkers syntax ; tasing you for every semicolon you forget @@ -139,7 +139,7 @@ ;;idris ; a language you can depend on json ; At least it ain't XML ;;(java +meghanada) ; the poster child for carpal tunnel syndrome - ;; javascript ; all(hope(abandon(ye(who(enter(here)))))) + (javascript +lsp) ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) ;;latex ; writing papers in Emacs has never been so fun @@ -165,7 +165,7 @@ ;; (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;scheme ; a fully conniving family of lisps - typescript + (typescript +lsp) sh ; she sells {ba,z,fi}sh shells on the C xor ;;sml ;;solidity ; do you need a blockchain? No.