feat: add websearch to anyrun
This commit is contained in:
commit
5b23af991f
11 changed files with 129 additions and 19 deletions
|
|
@ -1,7 +1,3 @@
|
|||
-- maps are automatically loaded on the VeryLazy event
|
||||
-- Default maps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/maps.lua
|
||||
-- Add any additional maps here
|
||||
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
|
|
@ -17,10 +13,6 @@ end
|
|||
local opts = { noremap = true, silent = true }
|
||||
local term_opts = { silent = true }
|
||||
|
||||
-- map("n", "d", ':set relativenumber<CR>d', opts)
|
||||
-- map("n", "y", ':set relativenumber<CR>y', opts)
|
||||
-- map("n", "<ESC>", ':set norelativenumber<CR><ESC>', opts)
|
||||
|
||||
-- crimes against humanity, but I don't care
|
||||
map("n", "j", "h", opts)
|
||||
map("n", "l", "k", opts)
|
||||
|
|
@ -43,7 +35,7 @@ map("n", "<F10>", ':lua require("dap").close()<CR> :lua require("dapui").toggle(
|
|||
map("n", "f", ":lua require('nvim-tree.api').tree.toggle()<CR>", opts)
|
||||
|
||||
-- toggle terminal
|
||||
map("n", "<C-d>", ":lua require('toggleterm').toggle(1)<CR>", opts)
|
||||
map("n", "<C-t>", ":lua require('toggleterm').toggle(1)<CR>", opts)
|
||||
|
||||
-- tab switching
|
||||
map("n", "<F1>", ":BufferLineCyclePrev<CR>", opts)
|
||||
|
|
@ -72,8 +64,8 @@ function _G.set_terminal_maps()
|
|||
vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set("t", "<A-h>", [[<Cmd>wincmd h<CR>]], opts)
|
||||
vim.keymap.set("t", "<A-j>", [[<Cmd>wincmd j<CR>]], opts)
|
||||
-- vim.keymap.set("t", "<A-k>", [[<Cmd>wincmd k<CR>]], opts)
|
||||
-- vim.keymap.set("t", "<A-l>", [[<Cmd>wincmd l<CR>]], opts)
|
||||
vim.keymap.set("n", "<C-t>", ":lua require('toggleterm').toggle(1)<CR>", opts)
|
||||
vim.keymap.set("i", "<C-t>", ":lua require('toggleterm').toggle(1)<CR>", opts)
|
||||
end
|
||||
|
||||
-- if you only want these mappings for toggle term use term://*toggleterm#* instead
|
||||
|
|
@ -84,7 +76,6 @@ map("n", "<A-l>", ":wincmd k<CR>", opts)
|
|||
map("n", "<A-;>", ":wincmd l<CR>", opts)
|
||||
|
||||
-- harpoon man
|
||||
|
||||
map("n", "<C-1>", ":lua require('harpoon.ui').nav_file(1)<CR>", opts)
|
||||
map("n", "<C-2>", ":lua require('harpoon.ui').nav_file(2)<CR>", opts)
|
||||
map("n", "<C-3>", ":lua require('harpoon.ui').nav_file(3)<CR>", opts)
|
||||
|
|
@ -98,7 +89,6 @@ map("n", "fg", ":lua require('telescope.builtin').live_grep()<CR>", {})
|
|||
map("n", "fh", ":lua require('telescope.builtin').help_tags()<CR>", {})
|
||||
map("n", "fp", ":lua require'telescope'.extensions.project.project{}<CR>", { noremap = true, silent = true })
|
||||
map("n", "fm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "<leader>z", ":lua require('telescope').extensions.zoxide.list{}<CR>")
|
||||
|
||||
-- trouble
|
||||
|
|
@ -110,8 +100,9 @@ function Better_yank(opts)
|
|||
vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "y")
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("BetterYank", Better_yank, { count = 1 }) map("n", "gy", ":BetterYank<CR>", term_opts)
|
||||
vim.api.nvim_create_user_command("BetterYank", Better_yank, { count = 1 })
|
||||
map("n", "<leader>y", ":BetterYank<CR>", term_opts)
|
||||
|
||||
-- better delete
|
||||
function Better_delete(opts)
|
||||
local current_line = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
|
|
@ -121,6 +112,24 @@ end
|
|||
vim.api.nvim_create_user_command("BetterDelete", Better_delete, { count = 1 })
|
||||
map("n", "<leader>d", ":BetterDelete<CR>", term_opts)
|
||||
|
||||
-- neovide zoom
|
||||
local change_scale_factor = function(delta)
|
||||
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
|
||||
end
|
||||
vim.keymap.set("n", "<C-=>", function()
|
||||
change_scale_factor(1.25)
|
||||
end)
|
||||
vim.keymap.set("n", "<C-->", function()
|
||||
change_scale_factor(1 / 1.25)
|
||||
end)
|
||||
|
||||
-- neovide paste
|
||||
vim.g.neovide_input_use_logo = 1
|
||||
vim.api.nvim_set_keymap('i', '<C-S-V>', '<ESC>p<CR>I', { noremap = true, silent = true})
|
||||
-- vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
||||
-- vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
||||
-- vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
||||
|
||||
-- gitui
|
||||
map("n", "<leader>gg", function()
|
||||
Util.float_term({ "gitui" }, { cwd = Util.get_root() })
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ return {
|
|||
marksman = {},
|
||||
asm_lsp = {},
|
||||
csharp_ls = {
|
||||
cmd = { "/home/dashie/.dotnet/tools/csharp-ls" },
|
||||
cmd = { "/home/dashie/.local/share/nvim/mason/bin/csharp-ls" },
|
||||
filetypes = { "cs" },
|
||||
init_options = {
|
||||
AutomaticWorkspaceInit = true,
|
||||
|
|
@ -115,6 +115,9 @@ return {
|
|||
jdtls = function()
|
||||
return true
|
||||
end,
|
||||
rust_analyzer = function()
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function(plugin, opts)
|
||||
|
|
@ -148,7 +151,6 @@ return {
|
|||
on_attach = on_attach,
|
||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{
|
||||
-- Disable virtual_text
|
||||
virtual_text = true,
|
||||
},
|
||||
}, servers[server] or {})
|
||||
|
|
|
|||
|
|
@ -158,4 +158,18 @@ return {
|
|||
require("neoscroll.config").set_mappings(t)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
lazy = true,
|
||||
event = "FileType rust",
|
||||
dependencies = { "neovim/nvim-lspconfig", "nvim-lua/plenary.nvim", "mfussenegger/nvim-dap" },
|
||||
opts = function()
|
||||
local extension_path = vim.env.HOME .. "/.local/share/nvim/mason/packages/codelldb/extension/"
|
||||
local codelldb_path = extension_path .. "adapter/codelldb"
|
||||
local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"
|
||||
return {
|
||||
dap = { adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path) },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue