feat: Add better terminal
This commit is contained in:
parent
7cacef1705
commit
8633e56645
11 changed files with 107 additions and 95 deletions
|
|
@ -1,76 +1,80 @@
|
||||||
{
|
{
|
||||||
"LazyVim": { "branch": "main", "commit": "274649e92321d615888f889476c9329f8d831e8e" },
|
"LazyVim": { "branch": "main", "commit": "ea4174d46016dd191de48c03bdf23462483f9f6a" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "480b032f6708573334f4437d3f83307d143f1a72" },
|
"LuaSnip": { "branch": "master", "commit": "0df29db3543837f8b41597f2640397c5ec792b7b" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
|
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
|
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "3d9a5ed556e289bce6c1fb0af89ec838360641b2" },
|
"catppuccin": { "branch": "main", "commit": "fc537040147f0374a22b88142a20eb6781141f0b" },
|
||||||
"cmp-async-path": { "branch": "main", "commit": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d" },
|
"cmp-async-path": { "branch": "main", "commit": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"crates.nvim": { "branch": "main", "commit": "04a06cee3fb9c584de4f5481eb4080bd6c759336" },
|
"conform.nvim": { "branch": "master", "commit": "4db76a68b47aa6e9777e4da4aed16f0fff74920e" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
|
"crates.nvim": { "branch": "main", "commit": "58bf989736765cae41fa5d0971027efeca033301" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "0256d8ecab33a9aa69fdaaf885db22e1103e2a3a" },
|
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
|
"flash.nvim": { "branch": "main", "commit": "6d76c5dee65181ab55cbdfb0760260e800d643f4" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "a36b277e527f9d34efe16c3636555ce0e0c0464c" },
|
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "bdeba1cec3faddd89146690c10b9a87949c0ee66" },
|
"git-blame.nvim": { "branch": "master", "commit": "e4dafc79cc7dcf4eec0547dbc6f3f3821b2f2b14" },
|
||||||
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
|
"gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "f5335ef7493bd6adf5f2ae21d67240709a514408" },
|
"harpoon": { "branch": "master", "commit": "c1aebbad9e3d13f20bedb8f2ce8b3a94e39e424a" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "0fe34b4c1b926e106d105d3ae88ef6cbf6743572" },
|
||||||
"instant.nvim": { "branch": "master", "commit": "294b6d08143b3db8f9db7f606829270149e1a786" },
|
"instant.nvim": { "branch": "master", "commit": "294b6d08143b3db8f9db7f606829270149e1a786" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "7ca3bdb566c3ba4492f2d22b37c2c9e26f09470f" },
|
"lazy.nvim": { "branch": "main", "commit": "33c447b96e1cb1a5a2be87982d5d32bb5054079d" },
|
||||||
"ltex_extra.nvim": { "branch": "master", "commit": "9bed99b2b8488cc2daf66c76d2e0cf051ee80d13" },
|
"ltex_extra.nvim": { "branch": "master", "commit": "9bed99b2b8488cc2daf66c76d2e0cf051ee80d13" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2451adb9bdb0fd32140bf3aa8dbc17ff60050db3" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "397273083f988c1a17acf3816947cd198338e700" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
|
||||||
"mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" },
|
"mini.ai": { "branch": "main", "commit": "10ad2ed049fb681a829b44aeb23443c0a9c910ae" },
|
||||||
"mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" },
|
"mini.bufremove": { "branch": "main", "commit": "75be0b153b0cd2499c031e57d44cde8dad4766e4" },
|
||||||
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
|
"mini.comment": { "branch": "main", "commit": "2c7a512dad27e34a26d0f7d5d5bc2579f88167dc" },
|
||||||
"mini.hipatterns": { "branch": "main", "commit": "eb93970cf1f92233e6475008dfc10fac7b025475" },
|
"mini.hipatterns": { "branch": "main", "commit": "6d24ccb409f3a7a1f42fb5ec5354ae59ac299420" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" },
|
"mini.indentscope": { "branch": "main", "commit": "cbc07203ca8faae952ca373c1f6cc5881ce97af0" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" },
|
"mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" },
|
||||||
"mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" },
|
"mini.surround": { "branch": "main", "commit": "68ce058ef9716d7d955b79363845d2dd003d6500" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "2b2af4c35b4f5e85e81a567412ba31e1643a2c02" },
|
"neoconf.nvim": { "branch": "main", "commit": "393d37abd9d82adcac627309a41758ae8e140d9e" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "f4abc72add7d2d986371c9d619f7b6f8297aa5ee" },
|
"neodev.nvim": { "branch": "main", "commit": "a4b6e7ca11ff5be2264d5c169fcedd97d8699ec4" },
|
||||||
"neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" },
|
"neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" },
|
||||||
"neotest": { "branch": "master", "commit": "1e67a504d03def3a6a1125d934cb511680f72555" },
|
"neotest": { "branch": "master", "commit": "1e67a504d03def3a6a1125d934cb511680f72555" },
|
||||||
"neotest-dotnet": { "branch": "main", "commit": "6528e761e4528aed3f4b60aff4c9f3406beb3cdd" },
|
"neotest-dotnet": { "branch": "main", "commit": "6528e761e4528aed3f4b60aff4c9f3406beb3cdd" },
|
||||||
"neotest-go": { "branch": "main", "commit": "1a15e1136db43775214a3e7a598f8930c29c94b7" },
|
"neotest-go": { "branch": "main", "commit": "1a15e1136db43775214a3e7a598f8930c29c94b7" },
|
||||||
"neotest-java": { "branch": "main", "commit": "5b915ad065e24149983a672c63e7273fe742fc0e" },
|
"neotest-java": { "branch": "main", "commit": "5b915ad065e24149983a672c63e7273fe742fc0e" },
|
||||||
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
|
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
|
||||||
"neotest-rust": { "branch": "main", "commit": "139cff7c85598ec591b5ed7d71ce8ed3b5313b97" },
|
"neotest-rust": { "branch": "main", "commit": "03e036a310379f132d4e39387e9076396132ce3f" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
|
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
|
||||||
"null.nvim": { "branch": "main", "commit": "bc6ea9deac03b791cdd980d8c84a5d923a26381c" },
|
"null.nvim": { "branch": "main", "commit": "bc6ea9deac03b791cdd980d8c84a5d923a26381c" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "b3d4408e29d924fe130c9397a7c3b3630b3ea671" },
|
"nvim-dap": { "branch": "master", "commit": "92dc531eea2c9a3ef504a5c8ac0decd1fa59a6a3" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
|
||||||
"nvim-jdtls": { "branch": "master", "commit": "3ca419c52a7c20a2565237db2c110ed68fc7e6f1" },
|
"nvim-jdtls": { "branch": "master", "commit": "3ca419c52a7c20a2565237db2c110ed68fc7e6f1" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "68b23c06132cb1ef8d5690111c112388fbcf1c30" },
|
"nvim-lint": { "branch": "master", "commit": "0f54481d7537a6872f7bb021575366657e123474" },
|
||||||
"nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" },
|
"nvim-lspconfig": { "branch": "master", "commit": "bb8e3dfbe10d80c294bb609c4bb4bba3ecdfbfe2" },
|
||||||
"nvim-spectre": { "branch": "master", "commit": "97cfd1b0f5a6ab35979ce1bee6c17f54745fd1e5" },
|
"nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "934469b9b6df369e198fb3016969e56393b0dc07" },
|
"nvim-tree.lua": { "branch": "master", "commit": "53b0bcaadaffb505acff230578b56a86ec1ab38a" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "cb139d880bcf9b3a6f29f2bd088a7491d1662918" },
|
"nvim-treesitter": { "branch": "master", "commit": "783e5fc3079680b307e8ac518935317907e71a59" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "4cf64264c049c55f256550ad247b606f3e53bc77" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "a1e6268779411048a87f767a27380089362a0ce2" },
|
||||||
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "53edfb413a54c9e55dcddc9e9fa4977a897e4425" },
|
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "53edfb413a54c9e55dcddc9e9fa4977a897e4425" },
|
||||||
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
|
"persistence.nvim": { "branch": "main", "commit": "9730a073fd8270e91729d666bcef6a5abc007f02" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
|
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "6e51d0cd6447cf2525412220ff0a2885eef9039c" },
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "6e51d0cd6447cf2525412220ff0a2885eef9039c" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
"telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" },
|
"telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" },
|
||||||
"telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
|
"telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "84d53dfdbefbdf84e861a288abc71ef8ccafd04e" },
|
"telescope.nvim": { "branch": "master", "commit": "74ce793a60759e3db0d265174f137fb627430355" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "e89caa3ad6d8da9d0dd981ec74a82c55adc61ffd" },
|
"tokyonight.nvim": { "branch": "main", "commit": "dce0ab49ae751f4f3617ab42d6f20c72369c7cb1" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
|
"trouble.nvim": { "branch": "main", "commit": "02219b557d4726a789be58c5d6bd6e139c46a9fe" },
|
||||||
"typst.vim": { "branch": "main", "commit": "65f9e78c11829a643d1539f3481c0ff875c83603" },
|
"typst.vim": { "branch": "main", "commit": "8101539d6b1e4a9ae071f26ac7602cd3866ec4de" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "1b5d70332a51a1de05f281069851865a2bb1e6d7" },
|
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
|
||||||
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
||||||
"vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" },
|
"vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" },
|
||||||
"vimtex": { "branch": "master", "commit": "7d453a61b0256337f341a1195ca9eb3f3890a7df" },
|
"vimtex": { "branch": "master", "commit": "cbb20643b7bfe721902dac5760bf0d4889fb5f7e" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
|
"which-key.nvim": { "branch": "main", "commit": "6962dae3565369363b59dd51fb206051555fcb4d" }
|
||||||
}
|
}
|
||||||
9
nvim/lazyvim.json
Normal file
9
nvim/lazyvim.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "2123"
|
||||||
|
},
|
||||||
|
"version": 2
|
||||||
|
}
|
||||||
|
|
@ -50,10 +50,10 @@ end, opts)
|
||||||
|
|
||||||
-- toggle terminal
|
-- toggle terminal
|
||||||
local lazyterm = function()
|
local lazyterm = function()
|
||||||
Util.float_term(nil, { cwd = Util.get_root() })
|
Util.terminal(nil, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false })
|
||||||
end
|
end
|
||||||
map("n", "<c-t>", lazyterm, { desc = "Terminal (root dir)" })
|
map("n", "<c-t>", lazyterm, { desc = "Terminal (root dir)" })
|
||||||
map("t", "<C-t>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
map("t", "<c-t>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||||
|
|
||||||
-- semicolon thing
|
-- semicolon thing
|
||||||
-- map("i","<C-m>" ,"<C-o>A;<CR>", {desc = "add semi and newline"})
|
-- map("i","<C-m>" ,"<C-o>A;<CR>", {desc = "add semi and newline"})
|
||||||
|
|
@ -133,6 +133,12 @@ map("n", "<leader>z", function()
|
||||||
require("telescope").extensions.zoxide.list({})
|
require("telescope").extensions.zoxide.list({})
|
||||||
end, { desc = "Zoxide" })
|
end, { desc = "Zoxide" })
|
||||||
|
|
||||||
|
-- neoscroll
|
||||||
|
local t = {}
|
||||||
|
t["<A-l>"] = { "scroll", { "-vim.wo.scroll", "true", "250" } }
|
||||||
|
t["<A-k>"] = { "scroll", { "vim.wo.scroll", "true", "250" } }
|
||||||
|
require("neoscroll.config").set_mappings(t)
|
||||||
|
|
||||||
-- trouble
|
-- trouble
|
||||||
map("n", "<leader>t", "<cmd>TroubleToggle<CR>", term_opts)
|
map("n", "<leader>t", "<cmd>TroubleToggle<CR>", term_opts)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||||
{ import = "plugins.plugins" },
|
{ import = "plugins.plugins" },
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
-- import any extras modules here
|
-- import any extras modules here
|
||||||
|
|
@ -47,4 +48,3 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ M._keys = nil
|
||||||
---@return (LazyKeys|{has?:string})[]
|
---@return (LazyKeys|{has?:string})[]
|
||||||
function M.get()
|
function M.get()
|
||||||
local format = function()
|
local format = function()
|
||||||
require("lazyvim.plugins.lsp.format").format({ force = true })
|
require("lazyvim.util").format({ force = true })
|
||||||
end
|
end
|
||||||
if not M._keys then
|
if not M._keys then
|
||||||
---@class PluginLspKeys
|
---@class PluginLspKeys
|
||||||
|
|
@ -89,7 +89,7 @@ end
|
||||||
---@param method string
|
---@param method string
|
||||||
function M.has(buffer, method)
|
function M.has(buffer, method)
|
||||||
method = method:find("/") and method or "textDocument/" .. method
|
method = method:find("/") and method or "textDocument/" .. method
|
||||||
local clients = vim.lsp.get_active_clients({ bufnr = buffer })
|
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
|
||||||
for _, client in ipairs(clients) do
|
for _, client in ipairs(clients) do
|
||||||
if client.supports_method(method) then
|
if client.supports_method(method) then
|
||||||
return true
|
return true
|
||||||
|
|
@ -98,45 +98,33 @@ function M.has(buffer, method)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@return (LazyKeys|{has?:string})[]
|
||||||
function M.resolve(buffer)
|
function M.resolve(buffer)
|
||||||
local Keys = require("lazy.core.handler.keys")
|
local Keys = require("lazy.core.handler.keys")
|
||||||
local keymaps = {} ---@type table<string,LazyKeys|{has?:string}>
|
if not Keys.resolve then
|
||||||
|
return {}
|
||||||
local function add(keymap)
|
|
||||||
local keys = Keys.parse(keymap)
|
|
||||||
if keys[2] == false then
|
|
||||||
keymaps[keys.id] = nil
|
|
||||||
else
|
|
||||||
keymaps[keys.id] = keys
|
|
||||||
end
|
end
|
||||||
end
|
local spec = M.get()
|
||||||
for _, keymap in ipairs(M.get()) do
|
|
||||||
add(keymap)
|
|
||||||
end
|
|
||||||
|
|
||||||
local opts = require("lazyvim.util").opts("nvim-lspconfig")
|
local opts = require("lazyvim.util").opts("nvim-lspconfig")
|
||||||
local clients = vim.lsp.get_active_clients({ bufnr = buffer })
|
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
|
||||||
for _, client in ipairs(clients) do
|
for _, client in ipairs(clients) do
|
||||||
local maps = opts.servers[client.name] and opts.servers[client.name].keys or {}
|
local maps = opts.servers[client.name] and opts.servers[client.name].keys or {}
|
||||||
for _, keymap in ipairs(maps) do
|
vim.list_extend(spec, maps)
|
||||||
add(keymap)
|
|
||||||
end
|
end
|
||||||
end
|
return Keys.resolve(spec)
|
||||||
return keymaps
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.on_attach(client, buffer)
|
function M.on_attach(_, buffer)
|
||||||
local Keys = require("lazy.core.handler.keys")
|
local Keys = require("lazy.core.handler.keys")
|
||||||
local keymaps = M.resolve(buffer)
|
local keymaps = M.resolve(buffer)
|
||||||
|
|
||||||
for _, keys in pairs(keymaps) do
|
for _, keys in pairs(keymaps) do
|
||||||
if not keys.has or M.has(buffer, keys.has) then
|
if not keys.has or M.has(buffer, keys.has) then
|
||||||
local opts = Keys.opts(keys)
|
local opts = Keys.opts(keys)
|
||||||
---@diagnostic disable-next-line: no-unknown
|
|
||||||
opts.has = nil
|
opts.has = nil
|
||||||
opts.silent = opts.silent ~= false
|
opts.silent = opts.silent ~= false
|
||||||
opts.buffer = buffer
|
opts.buffer = buffer
|
||||||
vim.keymap.set(keys.mode or "n", keys[1], keys[2], opts)
|
vim.keymap.set(keys.mode or "n", keys.lhs, keys.rhs, opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,8 @@ return {
|
||||||
for w in rust_dap:gmatch("([^/]+)") do
|
for w in rust_dap:gmatch("([^/]+)") do
|
||||||
filename = w
|
filename = w
|
||||||
end
|
end
|
||||||
|
filename = filename:gsub("-", "_")
|
||||||
|
filename = string.lower(filename)
|
||||||
|
|
||||||
dap.configurations.rust = {
|
dap.configurations.rust = {
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@ return {
|
||||||
{ "rcarriga/nvim-notify", enabled = false },
|
{ "rcarriga/nvim-notify", enabled = false },
|
||||||
},
|
},
|
||||||
{ { "folke/noice.nvim", enabled = false } },
|
{ { "folke/noice.nvim", enabled = false } },
|
||||||
{ { "jose-elias-alvarez/null-ls.nvim", enabled = false } },
|
{ { "nvimtools/none-ls.nvim", enabled = false } },
|
||||||
|
{ { "glepnir/dashboard-nvim", enabled = false } },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,11 +189,17 @@ return {
|
||||||
local plugin = require("lazy.core.config").spec.plugins["neoconf.nvim"]
|
local plugin = require("lazy.core.config").spec.plugins["neoconf.nvim"]
|
||||||
require("neoconf").setup(require("lazy.core.plugin").values(plugin, "opts", false))
|
require("neoconf").setup(require("lazy.core.plugin").values(plugin, "opts", false))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- setup autoformat
|
-- setup autoformat
|
||||||
require("lazyvim.plugins.lsp.format").setup(opts)
|
Util.format.register(Util.lsp.formatter())
|
||||||
|
|
||||||
|
-- deprectaed options
|
||||||
|
if opts.autoformat ~= nil then
|
||||||
|
vim.g.autoformat = opts.autoformat
|
||||||
|
end
|
||||||
|
|
||||||
-- setup formatting and keymaps
|
-- setup formatting and keymaps
|
||||||
Util.on_attach(function(client, buffer)
|
Util.lsp.on_attach(function(client, buffer)
|
||||||
require("config.lsp-keymap").on_attach(client, buffer)
|
require("config.lsp-keymap").on_attach(client, buffer)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
@ -218,7 +224,7 @@ return {
|
||||||
local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint
|
local inlay_hint = vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint
|
||||||
|
|
||||||
if opts.inlay_hints.enabled and inlay_hint then
|
if opts.inlay_hints.enabled and inlay_hint then
|
||||||
Util.on_attach(function(client, buffer)
|
Util.lsp.on_attach(function(client, buffer)
|
||||||
if client.supports_method("textDocument/inlayHint") then
|
if client.supports_method("textDocument/inlayHint") then
|
||||||
inlay_hint(buffer, true)
|
inlay_hint(buffer, true)
|
||||||
end
|
end
|
||||||
|
|
@ -290,17 +296,17 @@ return {
|
||||||
mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } })
|
mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } })
|
||||||
end
|
end
|
||||||
|
|
||||||
if Util.lsp_get_config("denols") and Util.lsp_get_config("tsserver") then
|
if Util.lsp.get_config("denols") and Util.lsp.get_config("tsserver") then
|
||||||
local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc")
|
local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc")
|
||||||
Util.lsp_disable("tsserver", is_deno)
|
Util.lsp.disable("tsserver", is_deno)
|
||||||
Util.lsp_disable("denols", function(root_dir)
|
Util.lsp.disable("denols", function(root_dir)
|
||||||
return not is_deno(root_dir)
|
return not is_deno(root_dir)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lspconfig").ltex.setup({
|
require("lspconfig").ltex.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = Util.on_attach(function(client, buffer)
|
on_attach = Util.lsp.on_attach(function(client, buffer)
|
||||||
require("config.lsp-keymap").on_attach(client, buffer)
|
require("config.lsp-keymap").on_attach(client, buffer)
|
||||||
require("ltex_extra").setup({
|
require("ltex_extra").setup({
|
||||||
path = vim.fn.expand("~") .. "/.local/share/ltex",
|
path = vim.fn.expand("~") .. "/.local/share/ltex",
|
||||||
|
|
|
||||||
|
|
@ -124,18 +124,6 @@ return {
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("neoscroll").setup()
|
require("neoscroll").setup()
|
||||||
local t = {}
|
|
||||||
t["<A-l>"] = { "scroll", { "-vim.wo.scroll", "true", "250" } }
|
|
||||||
t["<A-k>"] = { "scroll", { "vim.wo.scroll", "true", "250" } }
|
|
||||||
t["<C-b>"] = { "scroll", { "-vim.api.nvim_win_get_height(0)", "true", "450" } }
|
|
||||||
t["<C-f>"] = { "scroll", { "vim.api.nvim_win_get_height(0)", "true", "450" } }
|
|
||||||
t["<C-y>"] = { "scroll", { "-0.10", "false", "100" } }
|
|
||||||
t["<C-e>"] = { "scroll", { "0.10", "false", "100" } }
|
|
||||||
t["zt"] = { "zt", { "250" } }
|
|
||||||
t["zz"] = { "zz", { "250" } }
|
|
||||||
t["zb"] = { "zb", { "250" } }
|
|
||||||
|
|
||||||
require("neoscroll.config").set_mappings(t)
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,10 @@ com.rustdesk.RustDesk
|
||||||
com.usebottles.bottles
|
com.usebottles.bottles
|
||||||
com.valvesoftware.Steam.Utility.gamescope
|
com.valvesoftware.Steam.Utility.gamescope
|
||||||
de.haeckerfelix.Fragments
|
de.haeckerfelix.Fragments
|
||||||
im.fluffychat.Fluffychat
|
io.freetubeapp.FreeTube
|
||||||
io.github.Foldex.AdwSteamGtk
|
io.github.Foldex.AdwSteamGtk
|
||||||
io.github.lainsce.Colorway
|
io.github.lainsce.Colorway
|
||||||
Manager
|
Manager
|
||||||
io.github.spacingbat3.webcord
|
|
||||||
net.davidotek.pupgui2
|
net.davidotek.pupgui2
|
||||||
Picker
|
Picker
|
||||||
Platform
|
Platform
|
||||||
|
|
@ -30,6 +29,8 @@ org.freedesktop.Platform.GStreamer.gstreamer-vaapi
|
||||||
org.freedesktop.Platform.ffmpeg-full
|
org.freedesktop.Platform.ffmpeg-full
|
||||||
org.freedesktop.Platform.ffmpeg_full.i386
|
org.freedesktop.Platform.ffmpeg_full.i386
|
||||||
org.freedesktop.Platform.openh264
|
org.freedesktop.Platform.openh264
|
||||||
|
org.freedesktop.Platform.openh264
|
||||||
|
org.freedesktop.Platform.openh264
|
||||||
Application
|
Application
|
||||||
Application
|
Application
|
||||||
Application
|
Application
|
||||||
|
|
@ -46,3 +47,4 @@ Application
|
||||||
org.winehq.Wine.DLLs.dxvk
|
org.winehq.Wine.DLLs.dxvk
|
||||||
org.winehq.Wine.gecko
|
org.winehq.Wine.gecko
|
||||||
org.winehq.Wine.mono
|
org.winehq.Wine.mono
|
||||||
|
re.sonny.Workbench
|
||||||
|
|
|
||||||
|
|
@ -444,6 +444,7 @@ jq
|
||||||
jre17-openjdk
|
jre17-openjdk
|
||||||
jre17-openjdk-headless
|
jre17-openjdk-headless
|
||||||
js102
|
js102
|
||||||
|
js115
|
||||||
js91
|
js91
|
||||||
json-c
|
json-c
|
||||||
json-glib
|
json-glib
|
||||||
|
|
@ -491,7 +492,7 @@ kidletime5
|
||||||
kio-extras
|
kio-extras
|
||||||
kio-fuse
|
kio-fuse
|
||||||
kio5
|
kio5
|
||||||
kirigami-addons
|
kirigami-addons5
|
||||||
kirigami2
|
kirigami2
|
||||||
kitemmodels5
|
kitemmodels5
|
||||||
kitemviews5
|
kitemviews5
|
||||||
|
|
@ -728,6 +729,7 @@ libe-book
|
||||||
libebml
|
libebml
|
||||||
libebur128
|
libebur128
|
||||||
libedit
|
libedit
|
||||||
|
libei
|
||||||
libelf
|
libelf
|
||||||
libepoxy
|
libepoxy
|
||||||
libepubgen
|
libepubgen
|
||||||
|
|
@ -867,6 +869,7 @@ libpaper
|
||||||
libpcap
|
libpcap
|
||||||
libpciaccess
|
libpciaccess
|
||||||
libpeas
|
libpeas
|
||||||
|
libpeas-2
|
||||||
libpgm
|
libpgm
|
||||||
libpipeline
|
libpipeline
|
||||||
libpipewire
|
libpipewire
|
||||||
|
|
@ -1648,6 +1651,7 @@ sassc
|
||||||
sbc
|
sbc
|
||||||
scdoc
|
scdoc
|
||||||
scour
|
scour
|
||||||
|
sdbus-cpp
|
||||||
sdl12-compat
|
sdl12-compat
|
||||||
sdl2
|
sdl2
|
||||||
sdl2_image
|
sdl2_image
|
||||||
|
|
@ -1719,6 +1723,7 @@ talloc
|
||||||
tar
|
tar
|
||||||
tcl
|
tcl
|
||||||
tdb
|
tdb
|
||||||
|
tecla
|
||||||
tectonic
|
tectonic
|
||||||
template-glib
|
template-glib
|
||||||
tevent
|
tevent
|
||||||
|
|
@ -1748,6 +1753,7 @@ ttf-linux-libertine
|
||||||
ttf-monofur
|
ttf-monofur
|
||||||
ttf-nerd-fonts-symbols
|
ttf-nerd-fonts-symbols
|
||||||
ttf-nerd-fonts-symbols-common
|
ttf-nerd-fonts-symbols-common
|
||||||
|
ttf-noto-nerd
|
||||||
twolame
|
twolame
|
||||||
typescript
|
typescript
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
|
|
@ -1835,6 +1841,7 @@ xcb-util-xrm
|
||||||
xdg-dbus-proxy
|
xdg-dbus-proxy
|
||||||
xdg-desktop-portal
|
xdg-desktop-portal
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
xdg-utils
|
xdg-utils
|
||||||
xdotool
|
xdotool
|
||||||
|
|
@ -1871,7 +1878,6 @@ yaml-cpp
|
||||||
yarn
|
yarn
|
||||||
yasm
|
yasm
|
||||||
yay
|
yay
|
||||||
yazi
|
|
||||||
youtube-dl
|
youtube-dl
|
||||||
yt-dlp
|
yt-dlp
|
||||||
zathura
|
zathura
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue