feat: update config
This commit is contained in:
parent
dae2172a0c
commit
798b56bc4f
@ -1,5 +1,5 @@
|
|||||||
# Update Repo
|
# Update Repo
|
||||||
source $HOME/.dotfiles/configs/zsh/update-repo.zsh
|
# source $HOME/.dotfiles/configs/zsh/update-repo.zsh
|
||||||
|
|
||||||
# p10k
|
# p10k
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
@ -37,6 +37,7 @@ plugins=(
|
|||||||
asdf
|
asdf
|
||||||
tmux
|
tmux
|
||||||
nx-completion
|
nx-completion
|
||||||
|
you-should-use
|
||||||
sudo
|
sudo
|
||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||||
|
"Lua.diagnostics.globals": [
|
||||||
|
"vim",
|
||||||
|
"require"
|
||||||
|
],
|
||||||
"Lua.workspace.checkThirdParty": false
|
"Lua.workspace.checkThirdParty": false
|
||||||
}
|
}
|
@ -4,6 +4,7 @@ require("max.core.bootstrap")
|
|||||||
|
|
||||||
require("max.core.plugins")
|
require("max.core.plugins")
|
||||||
|
|
||||||
|
|
||||||
require("max.core.autocommands")
|
require("max.core.autocommands")
|
||||||
require("max.core.keymappings")
|
require("max.core.keymappings")
|
||||||
|
|
||||||
|
@ -4,65 +4,68 @@
|
|||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" },
|
"FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "5d57303efde86fcb0959c52b1a6d40f923940f34" },
|
"LuaSnip": { "branch": "master", "commit": "5d57303efde86fcb0959c52b1a6d40f923940f34" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "21a0f2520ad3a7c32c0822f943368dc063a569fb" },
|
"alpha-nvim": { "branch": "main", "commit": "21a0f2520ad3a7c32c0822f943368dc063a569fb" },
|
||||||
"autolist.nvim": { "branch": "main", "commit": "71b89ac9f7dd9739f4b477f59301d807d5f3a347" },
|
"autolist.nvim": { "branch": "main", "commit": "f8b4c11b79b0fef77a64b03810839a1abbbc67d5" },
|
||||||
"boole.nvim": { "branch": "main", "commit": "23a799a60a0f56640a24d9fc20cf35ed958549ee" },
|
"boole.nvim": { "branch": "main", "commit": "23a799a60a0f56640a24d9fc20cf35ed958549ee" },
|
||||||
"catppuccin": { "branch": "main", "commit": "3020af75aae098a77737d91ee37c7147c8450d99" },
|
"bufferline.nvim": { "branch": "main", "commit": "c7492a76ce8218e3335f027af44930576b561013" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "ecfa842c38b937596c81fa8df2123de69b980081" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
|
"copilot-cmp": { "branch": "master", "commit": "b732a58ac8b7287b981cd9f0d9c0f61e5e9d5760" },
|
||||||
|
"copilot.lua": { "branch": "master", "commit": "5b911f2d8ecccc684c13fdb8af4145cca19dc3cf" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
||||||
"editorconfig-vim": { "branch": "master", "commit": "30ddc057f71287c3ac2beca876e7ae6d5abe26a0" },
|
"editorconfig-vim": { "branch": "master", "commit": "30ddc057f71287c3ac2beca876e7ae6d5abe26a0" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "484fb38b8f493ceeebf4e6fc499ebe41e10aae25" },
|
"flit.nvim": { "branch": "main", "commit": "be110f9814a45788d10537fd59b3c76d956bb7ad" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "45698b3d193fff404c3c9c30d25dc138a729d64b" },
|
||||||
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
|
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
|
||||||
"fzf": { "branch": "master", "commit": "e0f0984da7ecb0132a1744220d1d96c32583c0b8" },
|
"fzf": { "branch": "master", "commit": "1c83b3969185393f0427463a39ef1523c273c16c" },
|
||||||
"git-conflict.nvim": { "branch": "main", "commit": "cbefa7075b67903ca27f6eefdc9c1bf0c4881017" },
|
"git-conflict.nvim": { "branch": "main", "commit": "cbefa7075b67903ca27f6eefdc9c1bf0c4881017" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "114362a85e51918ab2965181ffa31932c181f32f" },
|
"gitsigns.nvim": { "branch": "main", "commit": "addd6e174a85fc1c4007ab0b65d77e6555b417bf" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "e6ee0fa6103e9514e85a96fc16902ad7f777b53f" },
|
"lazy.nvim": { "branch": "main", "commit": "666ed7bf73eb5895253c1155bd29270b066cbdac" },
|
||||||
"leap.nvim": { "branch": "main", "commit": "a968ab4250840dc879e805f918b4f3b892310a12" },
|
"leap.nvim": { "branch": "main", "commit": "a968ab4250840dc879e805f918b4f3b892310a12" },
|
||||||
"litee-calltree.nvim": { "branch": "main", "commit": "e2dffec35740032258fee3a3c7f30123226f2271" },
|
|
||||||
"litee-symboltree.nvim": { "branch": "main", "commit": "488a660afcfd54644e6b755256907d3c7d8cf8d0" },
|
|
||||||
"litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" },
|
|
||||||
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
|
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
|
||||||
"lsp-zero.nvim": { "branch": "main", "commit": "b3d60f170a23ba52cfd56fd6f8ce70a38e853330" },
|
|
||||||
"lsp_lines.nvim": { "branch": "main", "commit": "ec98b45c8280e5ef8c84028d4f38aa447276c002" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
"lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
||||||
"lspsaga.nvim": { "branch": "main", "commit": "b7b4777369b441341b2dcd45c738ea4167c11c9e" },
|
"lspsaga.nvim": { "branch": "main", "commit": "0817d11977a686d47a105c2634c05bc9a1f0537a" },
|
||||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "d8c392dd75778d6258da4e7c55522e94ac389732" },
|
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "3751eb5c56c67b51e68a1f4a0da28ae74ab771c1" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "43c7f402cb9822b61b5dc05bf0b385928df256a6" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "a4ebe1f14ba31242cd09f9e0709d5b1f9d2bcecb" },
|
"mason.nvim": { "branch": "main", "commit": "5ab101aa11849c2424d5b87726105daae8cb49e8" },
|
||||||
"neotest": { "branch": "master", "commit": "fee5ce9bdc3dff4706a29b012e75025ab376becb" },
|
"neotest": { "branch": "master", "commit": "fee5ce9bdc3dff4706a29b012e75025ab376becb" },
|
||||||
"neotest-jest": { "branch": "main", "commit": "8b8926480865e56053681d0c56e3be0a3b5e716c" },
|
"neotest-jest": { "branch": "main", "commit": "8b8926480865e56053681d0c56e3be0a3b5e716c" },
|
||||||
"neotest-vitest": { "branch": "main", "commit": "d6577b191e16c174bffbec1eadfcd65c22fdcc0d" },
|
"neotest-vitest": { "branch": "main", "commit": "d6577b191e16c174bffbec1eadfcd65c22fdcc0d" },
|
||||||
"no-neck-pain.nvim": { "branch": "main", "commit": "6df43aec515aa68d266172934f849d01a2a4b8fd" },
|
"no-neck-pain.nvim": { "branch": "main", "commit": "6e7e2ec15b67ae61e93cc7c8e1cafbec7596cb0f" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "257da38029d3859ed111804f9d4e95b0fa993a31" },
|
"nui.nvim": { "branch": "main", "commit": "257da38029d3859ed111804f9d4e95b0fa993a31" },
|
||||||
|
"null-ls.nvim": { "branch": "main", "commit": "915558963709ea17c5aa246ca1c9786bfee6ddb4" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "f00eb3b766c370cb34fdabc29c760338ba9e4c6c" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" },
|
"nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "700a3c7d6fbe5b07bee74e9952b456120d355c47" },
|
"nvim-dap": { "branch": "master", "commit": "b8201fd104287e9c24f898f1f7f5202896eea203" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "f2206de65ea39093e3f13992507fc985c17aa763" },
|
"nvim-dap-ui": { "branch": "master", "commit": "b80227ea56a48177786904f6322abc8b2dc0bc36" },
|
||||||
"nvim-dap-vscode-js": { "branch": "main", "commit": "e7c05495934a658c8aa10afd995dacd796f76091" },
|
"nvim-dap-vscode-js": { "branch": "main", "commit": "e7c05495934a658c8aa10afd995dacd796f76091" },
|
||||||
"nvim-lastplace": { "branch": "main", "commit": "ecced899435c6bcdd81becb5efc6d5751d0dc4c8" },
|
"nvim-lspconfig": { "branch": "master", "commit": "ed88435764d8b00442e66d39ec3d9c360e560783" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "7b98aadc6e85db4fc3af6c1ec22c4774d965506e" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "b005821516f1f37801a73067afd1cef2dbc4dfe8" },
|
"nvim-notify": { "branch": "master", "commit": "b005821516f1f37801a73067afd1cef2dbc4dfe8" },
|
||||||
"nvim-scrollbar": { "branch": "main", "commit": "6e704cdeb7114385b4b19f9dc4b8f0c442019edc" },
|
"nvim-scrollbar": { "branch": "main", "commit": "6a2065fbcd032075a06d2ab54508b69842bc4496" },
|
||||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" },
|
"nvim-toggleterm.lua": { "branch": "main", "commit": "a54e6c471ce1cd8ef8357e34598a28a955297131" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "677d54afee1dfa7a30eb9e16ab7d9d1affc6484b" },
|
"nvim-tree.lua": { "branch": "master", "commit": "3ce0a8e770f70a135ef969e0a640bd8d05baf42c" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "5fb315df12a3091f241b0326aed0ec70381adbd8" },
|
"nvim-treesitter": { "branch": "master", "commit": "51d220e0bd8922caabcb3e5de936fc599a1bd210" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "a8c86f48c1030acee22b9e071e3c531de77bf253" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "a8c86f48c1030acee22b9e071e3c531de77bf253" },
|
||||||
"nvim-ufo": { "branch": "main", "commit": "71a1bb367f3e6df402546a69ca4e64b567901c73" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "4a42b30376c1bd625ab5016c2079631d531d797a" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "e3528c9b7ca20e9e0d69d588037f484257f0d652" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "6c38926351372ea87034dec26182b62c835ff3bc" },
|
"nvim-web-devicons": { "branch": "master", "commit": "6c38926351372ea87034dec26182b62c835ff3bc" },
|
||||||
"persisted.nvim": { "branch": "main", "commit": "558fc4b9f48e16008782240521cb72455d93b835" },
|
"persisted.nvim": { "branch": "main", "commit": "558fc4b9f48e16008782240521cb72455d93b835" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "9d81624fbcedd3dd43b38d7e13a1e7b3f873d8cd" },
|
"plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" },
|
||||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
"promise-async": { "branch": "main", "commit": "842dca33e6b1af7bedcefc72cffbc807d54dbfca" },
|
"promise-async": { "branch": "main", "commit": "842dca33e6b1af7bedcefc72cffbc807d54dbfca" },
|
||||||
"sniprun": { "branch": "master", "commit": "79806dad094770a1563ac0227c9692f7592df744" },
|
"sniprun": { "branch": "master", "commit": "79806dad094770a1563ac0227c9692f7592df744" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "04af51dbfb17c2afa0b8d82b0e842e0638201ca9" },
|
"symbols-outline.nvim": { "branch": "master", "commit": "6a3ed24c5631da7a5d418bced57c16b32af7747c" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "1ba7278cf08da8048e7f589ef6b65a39fd3e4dbf" },
|
||||||
"translate.nvim": { "branch": "main", "commit": "7b2fd50c21ecfe536d572d62dcd3fa83acad3743" },
|
"translate.nvim": { "branch": "main", "commit": "7b2fd50c21ecfe536d572d62dcd3fa83acad3743" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "83ec606e7065adf134d17f4af6bae510e3c491c1" },
|
"trouble.nvim": { "branch": "main", "commit": "83ec606e7065adf134d17f4af6bae510e3c491c1" },
|
||||||
"undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" },
|
"undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" },
|
||||||
"vim-dadbod": { "branch": "master", "commit": "a09e40664e9cd30cd2b3f8866b796598302070f6" },
|
"vim-dadbod": { "branch": "master", "commit": "a09e40664e9cd30cd2b3f8866b796598302070f6" },
|
||||||
"vim-dadbod-ui": { "branch": "master", "commit": "f4ead480930a37dd2b0cf917a8c387ed36c2d86a" },
|
"vim-dadbod-ui": { "branch": "master", "commit": "f4ead480930a37dd2b0cf917a8c387ed36c2d86a" },
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "85f69b07afce4ea77c58ae9a3aeb4e6c918b4d34" }
|
"which-key.nvim": { "branch": "main", "commit": "e4fa445065a2bb0bbc3cca85346b67817f28e83e" }
|
||||||
}
|
}
|
@ -1,4 +1,3 @@
|
|||||||
-- luasnip setup
|
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
require("luasnip/loaders/from_vscode").lazy_load()
|
require("luasnip/loaders/from_vscode").lazy_load()
|
||||||
@ -9,106 +8,109 @@ local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
require("lspconfig").html.setup({
|
require("lspconfig").html.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
require("nvim-autopairs").setup()
|
require("nvim-autopairs").setup()
|
||||||
require("copilot").setup()
|
require("copilot").setup({
|
||||||
require("copilot_cmp").setup({
|
suggestion = { enabled = false },
|
||||||
clear_after_cursor = true,
|
panel = { enabled = false },
|
||||||
})
|
})
|
||||||
|
require("copilot_cmp").setup {
|
||||||
|
method = "getCompletionsCycling",
|
||||||
|
}
|
||||||
|
|
||||||
local check_backspace = function()
|
local check_backspace = function()
|
||||||
local col = vim.fn.col(".") - 1
|
local col = vim.fn.col(".") - 1
|
||||||
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
|
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
window = {
|
window = {
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
experimental = {
|
experimental = {
|
||||||
ghost_text = true,
|
ghost_text = true,
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = "menuone,noselect",
|
completeopt = "menuone,noselect",
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
luasnip.lsp_expand(args.body)
|
luasnip.lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-Leader>"] = cmp.mapping.complete({}),
|
["<C-Leader>"] = cmp.mapping.complete({}),
|
||||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif luasnip.expandable() then
|
elseif luasnip.expandable() then
|
||||||
luasnip.expand()
|
luasnip.expand()
|
||||||
elseif luasnip.expand_or_jumpable() then
|
elseif luasnip.expand_or_jumpable() then
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
elseif check_backspace() then
|
elseif check_backspace() then
|
||||||
fallback()
|
fallback()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
"i",
|
"i",
|
||||||
"s",
|
"s",
|
||||||
}),
|
}),
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable(-1) then
|
elseif luasnip.jumpable(-1) then
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
"i",
|
"i",
|
||||||
"s",
|
"s",
|
||||||
}),
|
}),
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind.cmp_format({
|
format = lspkind.cmp_format({
|
||||||
mode = "symbol_text",
|
mode = "symbol_text",
|
||||||
max_width = 50,
|
max_width = 50,
|
||||||
symbol_map = { Copilot = "" },
|
symbol_map = { Copilot = "" },
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "copilot" },
|
{ name = "copilot" },
|
||||||
{ name = "vim-dadbod-completion", filetype = "sql" },
|
{ name = "vim-dadbod-completion", filetype = "sql" },
|
||||||
{ name = "nvim_lua" },
|
{ name = "nvim_lua" },
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
{ name = "emoji" },
|
{ name = "emoji" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "calc" },
|
{ name = "calc" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||||
cmp.setup.cmdline("/", {
|
cmp.setup.cmdline("/", {
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
cmp.setup.cmdline(":", {
|
cmp.setup.cmdline(":", {
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "cmdline" },
|
{ name = "cmdline" },
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
||||||
|
@ -2,19 +2,20 @@ local mason = require("mason")
|
|||||||
local mason_lsp = require("mason-lspconfig")
|
local mason_lsp = require("mason-lspconfig")
|
||||||
local lsp = require("lspconfig")
|
local lsp = require("lspconfig")
|
||||||
|
|
||||||
|
|
||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.formatting.stylua,
|
require("null-ls").builtins.formatting.stylua,
|
||||||
require("null-ls").builtins.diagnostics.eslint,
|
require("null-ls").builtins.diagnostics.eslint,
|
||||||
require("null-ls").builtins.code_actions.eslint_d,
|
-- require("null-ls").builtins.code_actions.eslint_d,
|
||||||
-- require("null-ls").builtins.completion.spell,
|
-- require("null-ls").builtins.completion.spell,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
mason.setup()
|
mason.setup()
|
||||||
|
|
||||||
mason_lsp.setup({
|
mason_lsp.setup({
|
||||||
ensure_installed = { "sumneko_lua", "jsonls", "tsserver", "svelte", "cssls" },
|
ensure_installed = { "sumneko_lua", "jsonls", "tsserver", "svelte", "cssls" },
|
||||||
})
|
})
|
||||||
|
|
||||||
local runtime_path = vim.split(package.path, ";")
|
local runtime_path = vim.split(package.path, ";")
|
||||||
@ -22,230 +23,201 @@ table.insert(runtime_path, "lua/?.lua")
|
|||||||
table.insert(runtime_path, "lua/?/init.lua")
|
table.insert(runtime_path, "lua/?/init.lua")
|
||||||
|
|
||||||
local function on_attach(client, bufnr)
|
local function on_attach(client, bufnr)
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
|
|
||||||
if client.name == "tsserver" or client.name == "svelte" then
|
if client.name == "tsserver" or client.name == "svelte" then
|
||||||
-- params for the request
|
-- params for the request
|
||||||
local params = {
|
local params = {
|
||||||
command = "_typescript.organizeImports",
|
command = "_typescript.organizeImports",
|
||||||
arguments = { vim.api.nvim_buf_get_name(bufnr) },
|
arguments = { vim.api.nvim_buf_get_name(bufnr) },
|
||||||
title = "",
|
title = "",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- perform a syncronous request
|
-- perform a syncronous request
|
||||||
-- 500ms timeout depending on the size of file a bigger timeout may be needed
|
-- 500ms timeout depending on the size of file a bigger timeout may be needed
|
||||||
vim.lsp.buf_request_sync(bufnr, "workspace/executeCommand", params, 500)
|
vim.lsp.buf_request_sync(bufnr, "workspace/executeCommand", params, 500)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
-- vim.notify("Lsp (" .. client.name .. ") doesnt support format")
|
-- vim.notify("Lsp (" .. client.name .. ") doesnt support format")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
lsp.sumneko_lua.setup({
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
runtime = {
|
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = "LuaJIT",
|
|
||||||
-- Setup your lua path
|
|
||||||
path = runtime_path,
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
-- Get the language server to recognize the `vim` global
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
|
||||||
},
|
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
capabilities.textDocument.foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true
|
||||||
|
}
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
lsp.prismals.setup({
|
local custom_lsp = {};
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.emmet_ls.setup({
|
custom_lsp.tsserver = {
|
||||||
capabilities = capabilities,
|
on_attach = on_attach,
|
||||||
on_attach = on_attach,
|
capabilities = capabilities,
|
||||||
})
|
root_dir = lsp.util.root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git"),
|
||||||
|
}
|
||||||
|
|
||||||
lsp.solargraph.setup({
|
custom_lsp.sumneko_lua = {
|
||||||
filetypes = { "ruby" },
|
on_attach = on_attach,
|
||||||
on_attach = on_attach,
|
capabilities = capabilities,
|
||||||
})
|
settings = {
|
||||||
|
Lua = {
|
||||||
lsp.elixirls.setup({
|
runtime = {
|
||||||
on_attach = on_attach,
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
})
|
version = "LuaJIT",
|
||||||
|
-- Setup your lua path
|
||||||
lsp.jsonls.setup({
|
path = runtime_path,
|
||||||
capabilities = capabilities,
|
},
|
||||||
on_attach = on_attach,
|
diagnostics = {
|
||||||
settings = {
|
-- Get the language server to recognize the `vim` global
|
||||||
provideFormatter = false,
|
globals = { "vim" },
|
||||||
json = {
|
},
|
||||||
schemas = {
|
workspace = {
|
||||||
{
|
-- Make the server aware of Neovim runtime files
|
||||||
description = "TypeScript compiler configuration file",
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
fileMatch = { "tsconfig.json", "tsconfig.*.json" },
|
},
|
||||||
url = "http://json.schemastore.org/tsconfig",
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
},
|
telemetry = {
|
||||||
{
|
enable = false,
|
||||||
description = "ESLint config",
|
},
|
||||||
fileMatch = { ".eslintrc.json", ".eslintrc" },
|
|
||||||
url = "http://json.schemastore.org/eslintrc",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = "Prettier config",
|
|
||||||
fileMatch = { ".prettierrc", ".prettierrc.json", "prettier.config.json" },
|
|
||||||
url = "http://json.schemastore.org/prettierrc",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = "JSON schema for Import Maps files",
|
|
||||||
fileMatch = { "importmap.json", "import_map.json", "import-map.json" },
|
|
||||||
name = "importmap.json",
|
|
||||||
url = "https://json.schemastore.org/importmap.json",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = "NPM configuration file",
|
|
||||||
fileMatch = { "package.json" },
|
|
||||||
name = "package.json",
|
|
||||||
url = "https://json.schemastore.org/package.json",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
}
|
||||||
|
|
||||||
lsp.svelte.setup({
|
|
||||||
capabilities = capabilities,
|
custom_lsp.jsonls = {
|
||||||
on_attach = on_attach,
|
capabilities = capabilities,
|
||||||
})
|
on_attach = on_attach,
|
||||||
lsp.tsserver.setup({
|
settings = {
|
||||||
capabilities = capabilities,
|
provideFormatter = false,
|
||||||
on_attach = on_attach,
|
json = {
|
||||||
})
|
schemas = {
|
||||||
lsp.html.setup({
|
{
|
||||||
capabilities = capabilities,
|
description = "TypeScript compiler configuration file",
|
||||||
on_attach = on_attach,
|
fileMatch = { "tsconfig.json", "tsconfig.*.json" },
|
||||||
})
|
url = "http://json.schemastore.org/tsconfig",
|
||||||
lsp.phpactor.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lsp.intelephense.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
intelephense = {
|
|
||||||
stubs = {
|
|
||||||
"wordpress",
|
|
||||||
"woocommerce",
|
|
||||||
"wordpress-globals",
|
|
||||||
"wp-cli",
|
|
||||||
},
|
|
||||||
environment = {
|
|
||||||
includePaths = "/home/max/.composer/vendor/php-stubs/", -- this line forces the composer path for the stubs in case inteliphense don't find it...
|
|
||||||
},
|
|
||||||
files = {
|
|
||||||
maxSize = 5000000,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
})
|
description = "ESLint config",
|
||||||
lsp.cssls.setup({
|
fileMatch = { ".eslintrc.json", ".eslintrc" },
|
||||||
capabilities = capabilities,
|
url = "http://json.schemastore.org/eslintrc",
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.zls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.bashls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
filetypes = { "sh", "bash" },
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.rust_analyzer.setup({
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
imports = {
|
|
||||||
granularity = {
|
|
||||||
group = "module",
|
|
||||||
},
|
|
||||||
prefix = "self",
|
|
||||||
},
|
|
||||||
cargo = {
|
|
||||||
buildScripts = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
procMacro = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
})
|
description = "Prettier config",
|
||||||
|
fileMatch = { ".prettierrc", ".prettierrc.json", "prettier.config.json" },
|
||||||
lsp.gopls.setup({
|
url = "http://json.schemastore.org/prettierrc",
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp.yamlls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
yaml = {
|
|
||||||
schemas = {
|
|
||||||
["https://raw.githubusercontent.com/quantumblacklabs/kedro/develop/static/jsonschema/kedro-catalog-0.17.json"] = "conf/**/*catalog*",
|
|
||||||
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
|
||||||
["https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/traefik-v2-file-provider.json"] = "rules.yml",
|
|
||||||
["https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/traefik-v2.json"] = "traefik.yml",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
})
|
description = "JSON schema for Import Maps files",
|
||||||
|
fileMatch = { "importmap.json", "import_map.json", "import-map.json" },
|
||||||
lsp.glslls.setup(require("max.configs.lsp-glsl"))
|
name = "importmap.json",
|
||||||
|
url = "https://json.schemastore.org/importmap.json",
|
||||||
lsp.ltex.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
ltex = {
|
|
||||||
language = "de",
|
|
||||||
disabledRules = { ["en-US"] = { "PROFANITY" } },
|
|
||||||
dictionary = {
|
|
||||||
["en-US"] = { "perf", "ci", "neovim" },
|
|
||||||
},
|
|
||||||
hiddenFalsePositives = {
|
|
||||||
"neovim",
|
|
||||||
"Neovim",
|
|
||||||
"waybar",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description = "NPM configuration file",
|
||||||
|
fileMatch = { "package.json" },
|
||||||
|
name = "package.json",
|
||||||
|
url = "https://json.schemastore.org/package.json",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_lsp.intelephense = {
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
intelephense = {
|
||||||
|
stubs = {
|
||||||
|
"wordpress",
|
||||||
|
"woocommerce",
|
||||||
|
"wordpress-globals",
|
||||||
|
"wp-cli",
|
||||||
|
},
|
||||||
|
environment = {
|
||||||
|
includePaths = "/home/max/.composer/vendor/php-stubs/", -- this line forces the composer path for the stubs in case inteliphense don't find it...
|
||||||
|
},
|
||||||
|
files = {
|
||||||
|
maxSize = 5000000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_lsp.rust_analyzer = {
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
imports = {
|
||||||
|
granularity = {
|
||||||
|
group = "module",
|
||||||
|
},
|
||||||
|
prefix = "self",
|
||||||
|
},
|
||||||
|
cargo = {
|
||||||
|
buildScripts = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
procMacro = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_lsp.yamlls = {
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
schemas = {
|
||||||
|
["https://raw.githubusercontent.com/quantumblacklabs/kedro/develop/static/jsonschema/kedro-catalog-0.17.json"] = "conf/**/*catalog*",
|
||||||
|
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
||||||
|
["https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/traefik-v2-file-provider.json"] = "rules.yml",
|
||||||
|
["https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/traefik-v2.json"] = "traefik.yml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_lsp.glslls = require("max.configs.lsp-glsl")
|
||||||
|
|
||||||
|
custom_lsp.ltex = {
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
ltex = {
|
||||||
|
language = "de",
|
||||||
|
disabledRules = { ["en-US"] = { "PROFANITY" } },
|
||||||
|
dictionary = {
|
||||||
|
["en-US"] = { "perf", "ci", "neovim" },
|
||||||
|
},
|
||||||
|
hiddenFalsePositives = {
|
||||||
|
"neovim",
|
||||||
|
"Neovim",
|
||||||
|
"waybar",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup_handlers({
|
||||||
|
function(server_name)
|
||||||
|
if custom_lsp[server_name] ~= nil then
|
||||||
|
lsp[server_name].setup(custom_lsp[server_name])
|
||||||
|
else
|
||||||
|
lsp[server_name].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
|
context_commentstring = {
|
||||||
|
enable = true
|
||||||
|
},
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
@ -41,8 +41,18 @@ augroup filetypedetect
|
|||||||
augroup END
|
augroup END
|
||||||
]])
|
]])
|
||||||
|
|
||||||
autocmd({ "BufReadPost" }, {
|
-- autocmd({ "BufReadPost" }, {
|
||||||
pattern = "*",
|
-- pattern = "*",
|
||||||
group = config_group,
|
-- group = config_group,
|
||||||
command = "filetype detect",
|
-- command = "filetype detect",
|
||||||
|
-- })
|
||||||
|
|
||||||
|
autocmd("BufReadPost", {
|
||||||
|
callback = function()
|
||||||
|
local mark = vim.api.nvim_buf_get_mark(0, '"')
|
||||||
|
local lcount = vim.api.nvim_buf_line_count(0)
|
||||||
|
if mark[1] > 0 and mark[1] <= lcount then
|
||||||
|
pcall(vim.api.nvim_win_set_cursor, 0, mark)
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
@ -27,6 +27,7 @@ map("n", "<Leader>a", ":Alpha<CR>", opts);
|
|||||||
-- LSP Functionality
|
-- LSP Functionality
|
||||||
map("n", "<Leader>n", ":lua vim.diagnostic.goto_next()<CR>", opts)
|
map("n", "<Leader>n", ":lua vim.diagnostic.goto_next()<CR>", opts)
|
||||||
map("n", "<Leader>p", ":lua vim.diagnostic.goto_prev()<CR>", opts)
|
map("n", "<Leader>p", ":lua vim.diagnostic.goto_prev()<CR>", opts)
|
||||||
|
map("n", "<Leader>e", ":lua vim.diagnostic.open_float()<CR>", opts)
|
||||||
map("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
map("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||||
map("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
map("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
map("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
map("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||||
@ -39,7 +40,7 @@ map({ "n", "v" }, "gr", "<cmd>Lspsaga lsp_finder<CR>", opts)
|
|||||||
map("n", "<Leader>u", ":UndotreeToggle<CR>", opts)
|
map("n", "<Leader>u", ":UndotreeToggle<CR>", opts)
|
||||||
|
|
||||||
-- This is my [i]nspect section, [i]nspect [s]ymbols
|
-- This is my [i]nspect section, [i]nspect [s]ymbols
|
||||||
map("n", "<Leader>is", "<cmd>lua require('litee.lib.lsp.wrappers').buf_document_symbol()<CR>", opts)
|
map("n", "<Leader>is", "<cmd>SymbolsOutline<cr>", opts)
|
||||||
map("n", "<Leader>io", "<cmd>Lspsaga outline<CR>", opts)
|
map("n", "<Leader>io", "<cmd>Lspsaga outline<CR>", opts)
|
||||||
map("n", "<Leader>ip", ":TroubleToggle<CR>", opts)
|
map("n", "<Leader>ip", ":TroubleToggle<CR>", opts)
|
||||||
map({ "n", "v" }, "<Leader>t", require("max.configs.translate"), opts)
|
map({ "n", "v" }, "<Leader>t", require("max.configs.translate"), opts)
|
||||||
@ -88,13 +89,20 @@ map("n", "<A-S-J>", "yyp", opts)
|
|||||||
-- If i paste with p, the replaced content doesnt replace my clipboard
|
-- If i paste with p, the replaced content doesnt replace my clipboard
|
||||||
map("v", "p", '"_dP', opts)
|
map("v", "p", '"_dP', opts)
|
||||||
|
|
||||||
|
-- clear highlights after search
|
||||||
|
map("n", "<leader>cl", ":noh<CR>", opts);
|
||||||
|
map("n", "<leader>m", ":Mason<CR>", opts);
|
||||||
|
map("n", "<leader>l", ":Lazy<CR>", opts);
|
||||||
|
map("n", "<leader>so", ":so %<CR>", opts);
|
||||||
|
|
||||||
|
|
||||||
-- Faster git merge
|
-- Faster git merge
|
||||||
map("n", "<Leader>gd", ":Gvdiffsplit!<CR>", opts)
|
map("n", "<Leader>gd", ":Gvdiffsplit!<CR>", opts)
|
||||||
map("n", "<Leader>gdl", ":diffget //3<CR>", opts)
|
map("n", "<Leader>gdl", ":diffget //3<CR>", opts)
|
||||||
map("n", "<Leader>gdh", ":diffget //2<CR>", opts)
|
map("n", "<Leader>gdh", ":diffget //2<CR>", opts)
|
||||||
|
|
||||||
-- Find file in NvimTree
|
-- Find file in NvimTree
|
||||||
map("n", "<Leader>e", ":NvimTreeToggle<CR>", opts)
|
map("n", "<Leader>j", ":NvimTreeToggle<CR>", opts)
|
||||||
map("n", "<Leader>f", ":NvimTreeFindFile<CR><c-w>", opts)
|
map("n", "<Leader>f", ":NvimTreeFindFile<CR><c-w>", opts)
|
||||||
|
|
||||||
-- I aint no weak boy
|
-- I aint no weak boy
|
||||||
|
@ -25,6 +25,8 @@ vim.cmd([[set complete+=kspell]]) -- auto complete with spellcheck
|
|||||||
vim.cmd([[set completeopt=menuone,noselect]]) -- auto complete menu (It's pretty great)
|
vim.cmd([[set completeopt=menuone,noselect]]) -- auto complete menu (It's pretty great)
|
||||||
vim.cmd([[set nocompatible]]) -- Disable compatibility to old-time vi
|
vim.cmd([[set nocompatible]]) -- Disable compatibility to old-time vi
|
||||||
set.mouse = "a" -- Enable mouse support
|
set.mouse = "a" -- Enable mouse support
|
||||||
|
set.signcolumn = "yes"
|
||||||
|
set.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||||
|
|
||||||
-- Configure Folds
|
-- Configure Folds
|
||||||
vim.cmd([[set wildmode=list:longest,full]]) -- Command-line completion mode
|
vim.cmd([[set wildmode=list:longest,full]]) -- Command-line completion mode
|
||||||
@ -50,7 +52,7 @@ set.termguicolors = true -- set term gui colors (most terminals support this)
|
|||||||
set.laststatus = 3 -- Always display the status line
|
set.laststatus = 3 -- Always display the status line
|
||||||
set.title = true -- Show current txt that you editing
|
set.title = true -- Show current txt that you editing
|
||||||
set.relativenumber = true -- Vim’s absolute, relative and hybrid line numbers
|
set.relativenumber = true -- Vim’s absolute, relative and hybrid line numbers
|
||||||
set.cursorline = false -- Enable highlighting of the current line
|
set.cursorline = true -- Enable highlighting of the current line
|
||||||
set.synmaxcol = 128
|
set.synmaxcol = 128
|
||||||
vim.cmd("syntax sync minlines=256")
|
vim.cmd("syntax sync minlines=256")
|
||||||
set.mousescroll = "ver:1,hor:1"
|
set.mousescroll = "ver:1,hor:1"
|
||||||
|
@ -13,6 +13,7 @@ local plugins = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
require("max.configs.lualine")
|
require("max.configs.lualine")
|
||||||
end,
|
end,
|
||||||
@ -21,9 +22,11 @@ local plugins = {
|
|||||||
--------------------
|
--------------------
|
||||||
-- Layout Plugins --
|
-- Layout Plugins --
|
||||||
--------------------
|
--------------------
|
||||||
|
{ 'akinsho/bufferline.nvim', lazy = false, config = true },
|
||||||
{ "shortcuts/no-neck-pain.nvim", cmd = "NoNeckPain", config = true },
|
{ "shortcuts/no-neck-pain.nvim", cmd = "NoNeckPain", config = true },
|
||||||
{
|
{
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
|
lazy = false,
|
||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -34,17 +37,10 @@ local plugins = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ldelossa/litee.nvim",
|
"simrat39/symbols-outline.nvim",
|
||||||
cmd = "InsertEnter",
|
cmd = "SymbolsOutline",
|
||||||
dependencies = {
|
config = true,
|
||||||
"ldelossa/litee-symboltree.nvim",
|
|
||||||
"ldelossa/litee-calltree.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("max.configs.litee")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{ "ethanholz/nvim-lastplace", event = "BufReadPre", config = true },
|
|
||||||
{ "mbbill/undotree", lazy = false },
|
{ "mbbill/undotree", lazy = false },
|
||||||
{
|
{
|
||||||
"petertriho/nvim-scrollbar",
|
"petertriho/nvim-scrollbar",
|
||||||
@ -78,16 +74,15 @@ local plugins = {
|
|||||||
event = "BufReadPost",
|
event = "BufReadPost",
|
||||||
dependencies = 'kevinhwang91/promise-async',
|
dependencies = 'kevinhwang91/promise-async',
|
||||||
config = function()
|
config = function()
|
||||||
require('ufo').setup({
|
require("ufo").setup()
|
||||||
provider_selector = function()
|
|
||||||
return { 'treesitter', 'indent' }
|
|
||||||
end
|
|
||||||
})
|
|
||||||
vim.o.foldcolumn = '1'
|
vim.o.foldcolumn = '1'
|
||||||
vim.o.foldlevel = 99
|
vim.o.foldlevel = 99
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
vim.o.foldenable = true
|
vim.o.foldenable = true
|
||||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
-- vim.o.statuscolumn = "%=%l%s%C"
|
||||||
|
vim.o.statuscolumn = '%=%l%s%{foldlevel(v:lnum) > foldlevel(v:lnum - 1) ? (foldclosed(v:lnum) == -1 ? "" : "") : " " }'
|
||||||
|
-- vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -109,7 +104,7 @@ local plugins = {
|
|||||||
}, -- startup screen
|
}, -- startup screen
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
event = "BufReadPre",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("Comment").setup()
|
require("Comment").setup()
|
||||||
end,
|
end,
|
||||||
@ -119,13 +114,12 @@ local plugins = {
|
|||||||
---------------------
|
---------------------
|
||||||
"junegunn/fzf",
|
"junegunn/fzf",
|
||||||
{
|
{
|
||||||
"ggandor/leap.nvim",
|
"ggandor/flit.nvim",
|
||||||
|
dependencies = {
|
||||||
config = function()
|
"ggandor/leap.nvim",
|
||||||
local leap = require("leap")
|
},
|
||||||
leap.add_default_mappings()
|
event = "VimEnter",
|
||||||
leap.setup({})
|
config = true,
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
@ -133,42 +127,28 @@ local plugins = {
|
|||||||
require("max.configs.telescope")
|
require("max.configs.telescope")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
-- Lsp Setup --
|
-- Lsp Setup --
|
||||||
---------------
|
---------------
|
||||||
|
{
|
||||||
{ "glepnir/lspsaga.nvim",
|
"glepnir/lspsaga.nvim",
|
||||||
cmd = "Lspsaga"
|
event = 'BufRead',
|
||||||
}, -- better windows for lsp replace, goto definition etc...
|
config = function()
|
||||||
{ "VonHeikemen/lsp-zero.nvim",
|
require('lspsaga').setup({})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{ "neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"arkav/lualine-lsp-progress",
|
"arkav/lualine-lsp-progress",
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-nvim-lua",
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
"onsails/lspkind.nvim",
|
"onsails/lspkind.nvim",
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
{ "lukas-reineke/lsp-format.nvim", config = true },
|
{ "lukas-reineke/lsp-format.nvim", config = true },
|
||||||
},
|
},
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
local lsp = require("lsp-zero")
|
require("max.configs.lsp")
|
||||||
lsp.preset("recommended")
|
|
||||||
lsp.on_attach(function(client, bufnr)
|
|
||||||
require("lsp-format").on_attach(client, bufnr)
|
|
||||||
end)
|
|
||||||
lsp.nvim_workspace()
|
|
||||||
lsp.setup()
|
|
||||||
vim.diagnostic.config { virtual_text = true }
|
|
||||||
|
|
||||||
end },
|
end },
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
@ -182,16 +162,36 @@ local plugins = {
|
|||||||
-- Autocomplete --
|
-- Autocomplete --
|
||||||
-------------------
|
-------------------
|
||||||
{ "tpope/vim-surround", lazy = false },
|
{ "tpope/vim-surround", lazy = false },
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-emoji",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-nvim-lua",
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("max.configs.autocomplete")
|
||||||
|
end
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"nat-418/boole.nvim",
|
"nat-418/boole.nvim",
|
||||||
event = "BufReadPre",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("boole").setup()
|
require("boole").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gaoDean/autolist.nvim",
|
"gaoDean/autolist.nvim",
|
||||||
event = "BufReadPre",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("autolist").setup({})
|
require("autolist").setup({})
|
||||||
end,
|
end,
|
||||||
@ -204,6 +204,7 @@ local plugins = {
|
|||||||
event = "BufReadPost",
|
event = "BufReadPost",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
"JoosepAlviste/nvim-ts-context-commentstring"
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("max.configs.treesitter")
|
require("max.configs.treesitter")
|
||||||
|
59
configs/nvim/lua/max/theme/icons.lua
Normal file
59
configs/nvim/lua/max/theme/icons.lua
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
local defaults = {
|
||||||
|
-- colorscheme can be a string like `catppuccin` or a function that will load the colorscheme
|
||||||
|
---@type string|fun()
|
||||||
|
colorscheme = function()
|
||||||
|
require("tokyonight").load()
|
||||||
|
end,
|
||||||
|
-- icons used by other plugins
|
||||||
|
icons = {
|
||||||
|
diagnostics = {
|
||||||
|
Error = " ",
|
||||||
|
Warn = " ",
|
||||||
|
Hint = " ",
|
||||||
|
Info = " ",
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
added = " ",
|
||||||
|
modified = " ",
|
||||||
|
removed = " ",
|
||||||
|
},
|
||||||
|
kinds = {
|
||||||
|
Array = " ",
|
||||||
|
Boolean = " ",
|
||||||
|
Class = " ",
|
||||||
|
Color = " ",
|
||||||
|
Constant = " ",
|
||||||
|
Constructor = " ",
|
||||||
|
Enum = " ",
|
||||||
|
EnumMember = " ",
|
||||||
|
Event = " ",
|
||||||
|
Field = " ",
|
||||||
|
File = " ",
|
||||||
|
Folder = " ",
|
||||||
|
Function = " ",
|
||||||
|
Interface = " ",
|
||||||
|
Key = " ",
|
||||||
|
Keyword = " ",
|
||||||
|
Method = " ",
|
||||||
|
Module = " ",
|
||||||
|
Namespace = " ",
|
||||||
|
Null = "ﳠ ",
|
||||||
|
Number = " ",
|
||||||
|
Object = " ",
|
||||||
|
Operator = " ",
|
||||||
|
Package = " ",
|
||||||
|
Property = " ",
|
||||||
|
Reference = " ",
|
||||||
|
Snippet = " ",
|
||||||
|
String = " ",
|
||||||
|
Struct = " ",
|
||||||
|
Text = " ",
|
||||||
|
TypeParameter = " ",
|
||||||
|
Unit = " ",
|
||||||
|
Value = " ",
|
||||||
|
Variable = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaults
|
Loading…
Reference in New Issue
Block a user