Skip to content

Commit

Permalink
chore(neovim): 𝓣𝓱𝓮 𝓢𝓪𝓰𝓪 𝓒𝓸𝓷𝓽𝓲𝓷𝓾𝓮𝓼... 📝
Browse files Browse the repository at this point in the history
  • Loading branch information
xero committed Aug 4, 2023
1 parent 397c8dd commit 766f0d0
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 25 deletions.
5 changes: 5 additions & 0 deletions neovim/.config/nvim/lua/plugins/alpha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ return {
dashboard.section.terminal.height = 10
dashboard.section.terminal.opts.redraw = true
dashboard.section.terminal.opts.window_config.zindex = 1
-- offset placment for screenshots
-- dashboard.section.terminal.opts.window_config.col = math.floor((vim.o.columns - 70) / 2 + 20)
-- vim.cmd [[autocmd! User AlphaClosed]]

dashboard.section.buttons.val = {
dashboard.button('i', ' new file', ':ene <BAR> startinsert<CR>'),
dashboard.button('o', ' old files', ':Telescope oldfiles<CR>'),
Expand All @@ -17,6 +21,7 @@ return {
dashboard.button('h', ' browse git', ':Flog<CR>'),
dashboard.button('l', '󰒲 lazy', ':Lazy<CR>'),
dashboard.button('m', '󱌣 mason', ':Mason<CR>'),
dashboard.button('p', '󰄉 profile', ':Lazy profile<CR>'),
dashboard.button('q', '󰭿 quit', ':qa<CR>'),
}
for _, button in ipairs(dashboard.section.buttons.val) do
Expand Down
2 changes: 1 addition & 1 deletion neovim/.config/nvim/lua/plugins/fzf.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
'ibhagwan/fzf-lua',
event = "VeryLazy",
requires = { 'nvim-tree/nvim-web-devicons' },
dependencies = { 'nvim-tree/nvim-web-devicons' },
keys = {
{ "<leader>/c", function() require("fzf-lua").commands() end, desc = "Search commands" },
{ "<leader>/C", function() require("fzf-lua").command_history() end, desc = "Search command history" },
Expand Down
2 changes: 1 addition & 1 deletion neovim/.config/nvim/lua/plugins/git.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
"rbong/vim-flog",
verylazy = true,
event = "VeryLazy",
dependencies = {
"tpope/vim-fugitive",
},
Expand Down
14 changes: 7 additions & 7 deletions neovim/.config/nvim/lua/plugins/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"LuaSnip": { "branch": "master", "commit": "e81cbe6004051c390721d8570a4a0541ceb0df10" },
"LuaSnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" },
"alpha-nvim": { "branch": "main", "commit": "e4fc5e29b731bdf55d204c5c6a11dc3be70f3b65" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
Expand All @@ -8,7 +8,7 @@
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" },
"fzf-lua": { "branch": "main", "commit": "2fa4913c7db0c22e02c003c6f09b7ebb2d0ed367" },
"fzf-lua": { "branch": "main", "commit": "77c24ecce152bc32c0e99620cab5d03309ed3438" },
"gitsigns.nvim": { "branch": "main", "commit": "5d73da785a3c05fd63ac31769079db05169a6ec7" },
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
"inc-rename.nvim": { "branch": "main", "commit": "ed0f6f2b917cac4eb3259f907da0a481b27a3b7e" },
Expand All @@ -17,21 +17,21 @@
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
"lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" },
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"lush.nvim": { "branch": "main", "commit": "1b58de77b457ad22c81bcdd621fa5f943f41dd87" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"lush.nvim": { "branch": "main", "commit": "a8f0f7b9f837887f13a61d67b40ae26188fe4d62" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
"mason.nvim": { "branch": "main", "commit": "fe9e34a9ab4d64321cdc3ecab4ea1809239bb73f" },
"matchparen.nvim": { "branch": "main", "commit": "9f39b61f846befe5eda80a20cdc76c86c4a4f2fd" },
"miasma.nvim": { "branch": "main", "commit": "ec586b65e7602528e9779c4a31b89100cc4243bd" },
"neodev.nvim": { "branch": "main", "commit": "f860e226abd283a4fa5505ea7aa8c066ce495e04" },
"neodev.nvim": { "branch": "main", "commit": "aca9cf154e4a9c1b79450969dd8e179dc211b3f6" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
"nvim-highlight-colors": { "branch": "main", "commit": "231547093a788b925b8fc36351ad422701c3a8c8" },
"nvim-lspconfig": { "branch": "master", "commit": "a59d74e12340242c0735666fb2e91afdbe6f2496" },
"nvim-lspconfig": { "branch": "master", "commit": "c0de180ddb3df36feef8ac3607670894d0e7497f" },
"nvim-osc52": { "branch": "main", "commit": "3e96035d62290183fe7a11418db2b254fcfcaee3" },
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
"nvim-treesitter": { "branch": "master", "commit": "80aee02921085435b04e880cabd1fbe29f6da99a" },
"nvim-treesitter": { "branch": "master", "commit": "6c93c86272633937090806fedb2a20fe11025876" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "df75fcec548014f158cda6498ac38c4622c221e1" },
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
Expand Down
3 changes: 1 addition & 2 deletions neovim/.config/nvim/lua/plugins/lsp/remaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function X.set_default_on_buffer(client, bufnr)
end, "document symbols")
end

buf_set_keymap("n", "<leader>lsa", ":LspInfo<CR>", "lsp info")
buf_set_keymap("n", "<leader>li", ":LspInfo<CR>", "lsp info")
buf_set_keymap("n", "<leader>ls", vim.lsp.buf.signature_help, "show signature")
buf_set_keymap("n", "<leader>lE", vim.diagnostic.open_float, "show line diagnostics")
buf_set_keymap("n", "<leader>lt", function() LspToggle() end, "toggle lsp")
Expand All @@ -105,5 +105,4 @@ function X.set_default_on_buffer(client, bufnr)
end, "toggle lsp lines")
end

r.which_key("<leader>ls", "lsp servers")
return X
2 changes: 1 addition & 1 deletion neovim/.config/nvim/lua/plugins/lualine.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
requires = { 'nvim-tree/nvim-web-devicons' },
dependencies = { 'nvim-tree/nvim-web-devicons' },
init = function()
-- disable until lualine loads
vim.opt.laststatus = 0
Expand Down
2 changes: 1 addition & 1 deletion neovim/.config/nvim/lua/plugins/lush.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
"rktjmp/lush.nvim",
verylazy = true,
lazy = true,
dependencies = {
"rktjmp/shipwright.nvim",
},
Expand Down
19 changes: 8 additions & 11 deletions neovim/.config/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,19 @@ return {
})

local r = require("utils.remaps")

r.which_key("<leader>dt", "Treesitter")

r.noremap("n", "<leader>dtp", function()
r.noremap("n", "<leader>dp", function()
vim.treesitter.inspect_tree({ command = "botright 60vnew" })
end, "Treesitter playground")
end, "treesitter playground")

r.noremap("n", "<C-e>", function()
local result = vim.treesitter.get_captures_at_cursor(0)
print(vim.inspect(result))
end, "show treesitter capture group")

r.map_virtual("zi", "Init selection")
r.map_virtual("zi", "Expand node")
r.map_virtual("zo", "Expand scope")
r.map_virtual("zd", "Decrement scope")
r.map_virtual("zi", "init selection")
r.map_virtual("zi", "expand node")
r.map_virtual("zo", "expand scope")
r.map_virtual("zd", "decrement scope")

-- r.map_virtual("af", "Function outer motion")
-- r.map_virtual("if", "Function inner motion")
Expand All @@ -147,8 +144,8 @@ return {
--
-- r.which_key("fp", "parameters")
--
r.map_virtual("<leader>rp", "Swap parameter to next")
r.map_virtual("<leader>rP", "Swap parameter to previous")
r.map_virtual("<leader>rp", "swap parameter to next")
r.map_virtual("<leader>rP", "swap parameter to previous")
--
-- r.map_virtual("]m", "Go to next function (start)")
-- r.map_virtual("]M", "Go to next function (end)")
Expand Down
2 changes: 1 addition & 1 deletion neovim/.config/nvim/lua/plugins/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ return {
local groups = {
b = { name = "buffer" },
s = { name = "search" },
g = { name = "git" },
-- g = { name = "git" },
r = { name = "refactor" },
l = { name = "lsp" },
d = { name = "debug" },
Expand Down

0 comments on commit 766f0d0

Please sign in to comment.