Skip to content

Commit

Permalink
fix: mapping / and some plugins (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
senelway authored Jul 30, 2023
1 parent 9df1b6f commit 5a54014
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 58 deletions.
2 changes: 2 additions & 0 deletions alacritty/alacritty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ key_bindings:
#https://stackoverflow.com/questions/16359878/how-to-map-shift-enter/42461580#42461580
- { key: Return, mods: Shift, chars: "\x1b[13;2u" }
- { key: Return, mods: Control, chars: "\x1b[13;5u" }
- { key: J, mods: Command, action: ScrollPageUp }
- { key: K, mods: Command, action: ScrollPageDown }
22 changes: 11 additions & 11 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"Comment.nvim": { "branch": "master", "commit": "176e85eeb63f1a5970d6b88f1725039d85ca0055" },
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
"base46": { "branch": "v2.0", "commit": "cb012feef7ce8c0bb8cdcb2b858393aa92834f46" },
"LuaSnip": { "branch": "master", "commit": "e81cbe6004051c390721d8570a4a0541ceb0df10" },
"base46": { "branch": "v2.0", "commit": "1a3faca5fdb6da541a28c37efdb60d99b34c15cc" },
"better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"copilot.lua": { "branch": "master", "commit": "e48bd7020a98be217d85c006a298656294fd6210" },
"extensions": { "branch": "v2.0", "commit": "be0cc7e41de270c547a3be6593fb898f0e6da200" },
"extensions": { "branch": "v2.0", "commit": "0bfeb74229ad973ce600088997ac8421980f79bb" },
"friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" },
"gitsigns.nvim": { "branch": "main", "commit": "11b80e7eea249affc8776483272bcfc627b5552a" },
"gitsigns.nvim": { "branch": "main", "commit": "5d73da785a3c05fd63ac31769079db05169a6ec7" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"indent-blankline.nvim": { "branch": "master", "commit": "b7aa0aed55887edfaece23f7b46ab22232fc8741" },
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
Expand All @@ -21,19 +21,19 @@
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
"nvim-lspconfig": { "branch": "master", "commit": "6f426c34c8e21af2f934e56be9d1198a507ecc9f" },
"nvim-lspconfig": { "branch": "master", "commit": "b6091272422bb0fbd729f7f5d17a56d37499c54f" },
"nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" },
"nvim-tree.lua": { "branch": "master", "commit": "273c1700eb68c27dce4e518efafc8144fd7ce4ab" },
"nvim-treesitter": { "branch": "master", "commit": "736a672afe852dbad4199002c89b7461b285c47f" },
"nvim-tree.lua": { "branch": "master", "commit": "4bd30f0137e44dcf3e74cc1164efb568f78f2b02" },
"nvim-treesitter": { "branch": "master", "commit": "ee107fc759647293a84ad42b867f518331364fbe" },
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
"nvterm": { "branch": "main", "commit": "5ae78fb332e92447121d2af58a6313189a7799fb" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"rest.nvim": { "branch": "main", "commit": "22673c848768ff25517154a5aebfebc0c77d0b4f" },
"telescope.nvim": { "branch": "master", "commit": "1228f3b15ca3d9b95dcb92efda6a3448871030bd" },
"trouble.nvim": { "branch": "main", "commit": "fc4bb22b1d2cd5eb46fe61a9f6d6416d742beb5c" },
"ui": { "branch": "v2.0", "commit": "aab0e970988354758d3a62dec07155a875382b9d" },
"telescope.nvim": { "branch": "master", "commit": "22735947d84d78f29436c203f0a4b8dc15dda204" },
"trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" },
"ui": { "branch": "v2.0", "commit": "1d4267f47fc022c66af87261f49c32b9a05273cf" },
"vim-dadbod": { "branch": "master", "commit": "7d80bbd11c407a09e0f7b869c38f3dec3902805f" },
"vim-dadbod-completion": { "branch": "master", "commit": "fc7321a17f4c55db11fae89a884ddf4724020bae" },
"vim-dadbod-ui": { "branch": "master", "commit": "200aebf70e6fc4b0eb1d3ecf0d57028e198d8dc6" },
"which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" }
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
}
1 change: 0 additions & 1 deletion nvim/lua/custom/chadrc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ local highlights = require "custom.highlights"

M.ui = {
theme = "catppuccin",
-- TODO: fix it
theme_toggle = { "catppuccin", "monochrome" },
hl_override = highlights.override,
hl_add = highlights.add,
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/custom/configs/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local sources = {
b.formatting.goimports,

-- rust
b.formatting.rustfmt,
-- b.formatting.rustfmt,

-- NOTE: c#
-- b.formatting.csharpier
Expand Down
9 changes: 6 additions & 3 deletions nvim/lua/custom/configs/overrides.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ M.treesitter = {
"vue",

"go",
"rust",
-- "rust",

"sql",
"markdown",

"json",
"http",
},
indent = {
enable = true,
Expand Down Expand Up @@ -54,8 +57,8 @@ M.mason = {
-- "unocss-language-server",

-- rust
"rust-analyzer",
"rustfmt",
-- "rust-analyzer",
-- "rustfmt",

-- go lang
"gopls",
Expand Down
1 change: 1 addition & 0 deletions nvim/lua/custom/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

require("custom.utils.browser").load()

vim.opt.mouse = ""
vim.opt.relativenumber = true
vim.opt.title = true
vim.opt.swapfile = false
Expand Down
51 changes: 26 additions & 25 deletions nvim/lua/custom/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,37 @@ M.general = {
["|"] = { "<cmd> split <cr>", "split vertical" },
["="] = { "<cmd> close <cr>" },
["<leader>we"] = { "<cmd> set spell <cr>", "spell check" },
["<leader>go"] = { "<cmd> GithubOpen <cr>", "github open" },
},
i = {
["jj"] = { "<ESC>", "escape insert mode", opts = { nowait = true } },
["jk"] = { "<ESC>", "escape insert mode", opts = { nowait = true } },
},
}

M.recats = {
n = {
["<leader>go"] = { "<cmd> GithubOpen <cr>", "Github open" },
},
v = {
["<C-o>"] = { "<cmd> LinkOpen <cr>", "Browser open" },
},
}

M.harpoon = {
n = {
["<leader>a"] = {
function()
require("harpoon.mark").add_file()
end,
"add file to harpoon",
"Add file to harpoon",
},
["<leader>fh"] = {
function()
require("harpoon.ui").toggle_quick_menu()
end,
"harpoon quick menu",
"Harpoon quick menu",
},
},
i = {
["jj"] = { "<ESC>", "escape insert mode", opts = { nowait = true } },
["jk"] = { "<ESC>", "escape insert mode", opts = { nowait = true } },
["kk"] = { "<ESC>", "escape insert mode", opts = { nowait = true } },
},
v = {
["<C-o>"] = { "<cmd> LinkOpen <cr>", "browser open" },
},
}

M.lazygit = {
Expand All @@ -38,30 +47,21 @@ M.lazygit = {
},
}
M.RestNvim = {
plugin = true,
n = {
["<leader>tr"] = { "<cmd> RestNvim <cr>", "http request" },
["<leader>tr"] = { "<Plug>RestNvim", "HTTP request" },
},
}

M.dadbod = {
n = {
["<leader>fe"] = { "<cmd> DBUIToggle <cr>", "toggle database ui" },
["<leader>od"] = { "<cmd> DBUIToggle <cr>", "Toggle database ui" },
},
}

M.Trouble = {
plugin = true,
n = {
["<leader>fe"] = { "<cmd> Trouble <cr>", "find errors file" },
["<leader>fE"] = { "<cmd> Trouble workspace_diagnostics <cr>", "find errors in workspace" },
},
}

M.SymbolsOutline = {
plugin = true,
n = {
["<leader>so"] = { "<cmd> SymbolsOutline <cr>", "symbols outline" },
["<leader>fe"] = { "<cmd> Trouble <cr>", "Find errors in file" },
["<leader>fE"] = { "<cmd> Trouble workspace_diagnostics <cr>", "Find errors in workspace" },
},
}

Expand All @@ -85,13 +85,14 @@ M.telescope = {
n = {
["<leader>gbb"] = { "<cmd> Telescope git_branches <CR>", "git branches" },
["<leader>fs"] = { "<cmd> Telescope grep_string <CR>", "grep with word under cursor" },
["<leader>fc"] = { "<cmd> Telescope current_buffer_fuzzy_find <CR>", "Find in current buffer" },
},
}

M.nvterm = {
plugin = true,
t = {
["<leader><Esc>"] = {
["<Esc><Esc>"] = {
function()
if require("custom.utils.helpers").isCurrentBufferOption "terminal" then
require("nvterm.terminal").toggle "float"
Expand Down
37 changes: 20 additions & 17 deletions nvim/lua/custom/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ local plugins = {
require("custom.configs.dadbod").setup {}
end,
},
{
"rest-nvim/rest.nvim",
ft = "http",
dependencies = "nvim-lua/plenary.nvim",
config = function()
require("rest-nvim").setup {
env_file = ".env",
result = {
show_url = true,
},
}
end,
},
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
Expand All @@ -57,9 +44,7 @@ local plugins = {
{
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("trouble").setup {}
end,
cmd = "TroubleToggle",
},

{
Expand All @@ -82,7 +67,25 @@ local plugins = {
}
end,
},

{
"rest-nvim/rest.nvim",
ft = "http",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("rest-nvim").setup {
env_file = ".env",
result = {
show_url = true,
},
}
end,
},
-------------------------------
-------------------------------
-------------------------------
-------------------------------
-------------------------------
-------------------------------
{
"neovim/nvim-lspconfig",
dependencies = {
Expand Down

0 comments on commit 5a54014

Please sign in to comment.