minor fix

This commit is contained in:
js0ny 2025-03-13 10:31:31 +00:00
parent 180de92998
commit c6ad959982
11 changed files with 282 additions and 45 deletions

View file

@ -325,7 +325,7 @@ const searchAliases = [
["yt", "YouTube", "https://www.youtube.com/results?search_query="],
];
api.unmap("on")
api.unmap("on");
// Add all search aliases
searchAliases.forEach(([alias, name, url]) => {
@ -657,11 +657,35 @@ mapkey(
},
{ domain: /perplexity.ai/ },
);
mapkey(
",M",
"Toggle [M]odel switching",
function () {
q("div.rounded-md").querySelectorAll("span")[2].click();
//setTimeout(() => {
// // Wait for the DOM to update
// qs("div.shadow-subtle div.group\\/item")[0].click();
//}, 100);
},
{ domain: /perplexity.ai/ },
);
mapkey(
",m",
"Toggle default [m]odel (Claude 3.7 Sonnet)",
function () {
q("div.rounded-md").querySelectorAll("span")[1].click();
setTimeout(() => {
// Wait for the DOM to update
qs("div.shadow-subtle div.group\\/item")[3].click();
}, 100);
},
{ domain: /perplexity.ai/ },
);
mapkey(
",w",
"Toggle [w]riting/[w]eb Search",
function () {
q("div.rounded-md").querySelectorAll("span")[1].click();
q("div.rounded-md").querySelectorAll("span")[2].click();
setTimeout(() => {
// Wait for the DOM to update
qs("div.shadow-subtle div.group\\/item")[0].click();
@ -690,8 +714,8 @@ mapkey(
{ domain: /perplexity.ai/ },
);
mapkey(
",r",
"Change model to [r]egenerate last output",
",R",
"Change model to [R]egenerate last output",
function () {
var toolbars = qs("div.mt-sm");
var last = toolbars[toolbars.length - 1];
@ -701,15 +725,13 @@ mapkey(
{ domain: /perplexity.ai/ },
);
mapkey(
",R",
"Toggle [R]easoning with [R]1",
",r",
"Toggle [r]easoning",
function () {
var btns = qs("span.grow button");
btns[0].click();
q("div.rounded-md").querySelectorAll("span")[0].click();
setTimeout(() => {
// Wait for the DOM to update
qs("div.shadow-subtle div.group\\/item")[2].click();
qs("div.group\\/item")[2].click(); // Mobile view
}, 100);
},
{ domain: /perplexity.ai/ },

View file

@ -22,7 +22,7 @@
;; accept. For example:
;;
;; https://emacs-china.org/t/doom-emacs/23513/13
(setq doom-font (font-spec :family "LXGW WenKai Mono" :size 14)
(setq doom-font (font-spec :family "Iosevka Nerd Font Propo" :size 14)
doom-serif-font doom-font
doom-symbol-font (font-spec :family "LXGW WenKai Mono")
doom-variable-pitch-font (font-spec :family "LXGW WenKai Mono" :weight 'extra-bold))
@ -103,7 +103,7 @@
(add-to-list 'recentf-exclude "\\.#.+$")
(add-to-list 'recentf-exclude "^/tmp/")
(add-to-list 'recentf-exclude "COMMIT_EDITMSG\\'")
)[1][2]
)[1][2]
@ -133,11 +133,11 @@
(if (not (eq system-type 'windows-nt))
(use-package! rime
:config
(setq default-input-method "rime")
(add-hook! (org-mode markdown-mode) (activate-input-method default-input-method))
(setq rime-user-data-dir (expand-file-name "emacs-rime" (getenv "XDG_CONFIG_HOME")))
))
:config
(setq default-input-method "rime")
(add-hook! (org-mode markdown-mode) (activate-input-method default-input-method))
(setq rime-user-data-dir (expand-file-name "emacs-rime" (getenv "XDG_CONFIG_HOME")))
))
(load! "calendar.el")

View file

@ -193,7 +193,7 @@
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
(rss +org) ; emacs as an RSS reader
:config
;;literate

View file

@ -6,32 +6,32 @@ local M = {}
-- Use :Mason to list all available servers
M.servers = {
"ast_grep",
"bashls", -- Bash
"clangd", -- C/C++
"cssls", -- CSS
"denols", -- Deno
"bashls", -- Bash
"clangd", -- C/C++
"cssls", -- CSS
"denols", -- Deno
-- "cmake", -- CMake
"eslint", -- JavaScript
"gopls", -- Go
"hls", -- Haskell
"html", -- HTML
"jsonls", -- JSON
"lua_ls", -- Lua
"eslint", -- JavaScript
"gopls", -- Go
"hls", -- Haskell
"html", -- HTML
"jsonls", -- JSON
"lua_ls", -- Lua
"markdown_oxide", -- Markdown
"omnisharp", -- C# & F#
"powershell_es", -- PowerShell
"pyright", -- Python
"rust_analyzer", -- Rust
"svelte", -- Svelte
"svlangserver", -- SystemVerilog
"tailwindcss", -- TailwindCSS
"taplo", -- TOML
"ts_ls", -- TypeScript
"vimls", -- vimscript
"yamlls", -- YAML
"omnisharp", -- C# & F#
"powershell_es", -- PowerShell
"pyright", -- Python
"rust_analyzer", -- Rust
"svelte", -- Svelte
"svlangserver", -- SystemVerilog
"tailwindcss", -- TailwindCSS
"taplo", -- TOML
"ts_ls", -- TypeScript
"vimls", -- vimscript
"yamlls", -- YAML
"beancount", -- Beancount
}
-- Configuration for each server defines here
M.server_config = {
lua_ls = {

View file

@ -6,6 +6,7 @@ local M = {
{ keys = "gi", cmd = vim.lsp.buf.implementation, opts = { desc = "Goto Implementation" } },
{ keys = "<leader>,", cmd = vim.lsp.buf.code_action, opts = { desc = "Code Action" } },
{ keys = "ga", cmd = vim.lsp.buf.code_action, opts = { desc = "Code Action" } },
{ keys = "gh", cmd = vim.lsp.buf.hover, opts = { desc = "Show hover" } },
}
return M

View file

@ -24,7 +24,6 @@ return {
end,
dependencies = { "nvim-telescope/telescope.nvim" },
},
{ import = "plugins.mod.hover-nvim" },
-- {
-- "kdheepak/lazygit.nvim",
-- lazy = true,
@ -46,6 +45,6 @@ return {
-- },
-- },
{
"NeogitOrg/neogit"
}
"NeogitOrg/neogit",
},
}

8
tools/zed/keymap.json Executable file → Normal file
View file

@ -53,14 +53,18 @@
}
},
{
"context": "vim_mode == normal || not_editing || EmptyPane",
"context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
"bindings": {
"space space": "file_finder::Toggle",
"space ;": "command_palette::Toggle",
"space f c": "zed::OpenSettings",
"space f e c": "zed::OpenSettings",
"space f t": "project_panel::ToggleFocus"
"space f t": "project_panel::ToggleFocus",
"ctrl-w h": "workspace::ActivatePaneLeft",
"ctrl-w i": "workspace::ActivatePaneRight",
"ctrl-w e": "workspace::ActivatePaneUp",
"ctrl-w n": "workspace::ActivatePaneDown"
}
},
{

View file

@ -0,0 +1,91 @@
// $DOTFILES/tools/zed/keymaps.json
// Date: 2025-01-25
// Author: js0ny
// Description: Zed keymaps
// Location:
// GNU/Linux: ~/.config/zed/keymaps.json
// Windows: %APPDATA%\Zed\keymaps.json
// Linking: (link the whole directory)
// ln -sf $DOTFILES/tools/zed ~/.config/zed
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
// https://github.com/zed-industries/zed/tree/main/assets/keymaps
// Sequence: https://zed.dev/docs/key-bindings#remapping-keys
[
{
"context": "Workspace",
"bindings": {
// "shift shift": "file_finder::Toggle"
}
},
{
"context": "Editor",
"bindings": {
// "j k": ["workspace::SendKeystrokes", "escape"]
}
},
{
"context": "vim_mode == normal || vim_mode == visual",
"bindings": {
"N": "vim::JoinLines",
"l": "vim::InsertBefore",
"L": "vim::InsertFirstNonWhitespace",
"H": "pane::ActivatePrevItem",
"I": "pane::ActivateNextItem"
}
},
{
"context": "vim_mode == normal || not_editing || EmptyPane",
"bindings": {
"space space": "file_finder::Toggle",
"space ;": "command_palette::Toggle",
"space f c": "zed::OpenSettings",
"space f e c": "zed::OpenSettings",
"space f t": "project_panel::ToggleFocus"
}
},
{
"context": "vim_mode == normal || vim_mode == visual || vim_mode == operator",
"bindings": {
"n": "vim::Down",
"e": "vim::Up",
"i": "vim::Right",
"k": "search::SelectNextMatch",
"K": "search::SelectPrevMatch",
"N": ["workspace::SendKeystrokes", "n n n n n"],
"E": ["workspace::SendKeystrokes", "e e e e e"]
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
"n": "menu::SelectNext",
"e": "menu::SelectPrev",
"i": "project_panel::ExpandSelectedEntry",
"A": "project_panel::NewDirectory",
"a": "project_panel::NewFile",
"d": "project_panel::Delete"
}
}
]

View file

@ -18,6 +18,14 @@
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"edit_predictions": {
"disabled_globs": ["*.bean"],
"mode": "eager_preview",
"copilot": {
"proxy": null,
"proxy_no_verify": null
}
},
"base_keymap": "VSCode",
"vim_mode": true,
"ui_font_size": 16,