feat: update config
This commit is contained in:
parent
dae2172a0c
commit
798b56bc4f
@ -1,5 +1,5 @@
|
||||
# Update Repo
|
||||
source $HOME/.dotfiles/configs/zsh/update-repo.zsh
|
||||
# source $HOME/.dotfiles/configs/zsh/update-repo.zsh
|
||||
|
||||
# p10k
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
@ -37,6 +37,7 @@ plugins=(
|
||||
asdf
|
||||
tmux
|
||||
nx-completion
|
||||
you-should-use
|
||||
sudo
|
||||
zsh-autosuggestions
|
||||
)
|
||||
|
@ -1,4 +1,8 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"Lua.diagnostics.globals": [
|
||||
"vim",
|
||||
"require"
|
||||
],
|
||||
"Lua.workspace.checkThirdParty": false
|
||||
}
|
@ -4,6 +4,7 @@ require("max.core.bootstrap")
|
||||
|
||||
require("max.core.plugins")
|
||||
|
||||
|
||||
require("max.core.autocommands")
|
||||
require("max.core.keymappings")
|
||||
|
||||
|
@ -4,65 +4,68 @@
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "70a9516a64668cbfe59f31b66d0a21678c5e9b12" },
|
||||
"LuaSnip": { "branch": "master", "commit": "5d57303efde86fcb0959c52b1a6d40f923940f34" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "21a0f2520ad3a7c32c0822f943368dc063a569fb" },
|
||||
"autolist.nvim": { "branch": "main", "commit": "71b89ac9f7dd9739f4b477f59301d807d5f3a347" },
|
||||
"autolist.nvim": { "branch": "main", "commit": "f8b4c11b79b0fef77a64b03810839a1abbbc67d5" },
|
||||
"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-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "b732a58ac8b7287b981cd9f0d9c0f61e5e9d5760" },
|
||||
"copilot.lua": { "branch": "master", "commit": "5b911f2d8ecccc684c13fdb8af4145cca19dc3cf" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
||||
"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" },
|
||||
"fzf": { "branch": "master", "commit": "e0f0984da7ecb0132a1744220d1d96c32583c0b8" },
|
||||
"fzf": { "branch": "master", "commit": "1c83b3969185393f0427463a39ef1523c273c16c" },
|
||||
"git-conflict.nvim": { "branch": "main", "commit": "cbefa7075b67903ca27f6eefdc9c1bf0c4881017" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "114362a85e51918ab2965181ffa31932c181f32f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "e6ee0fa6103e9514e85a96fc16902ad7f777b53f" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "addd6e174a85fc1c4007ab0b65d77e6555b417bf" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "666ed7bf73eb5895253c1155bd29270b066cbdac" },
|
||||
"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-zero.nvim": { "branch": "main", "commit": "b3d60f170a23ba52cfd56fd6f8ce70a38e853330" },
|
||||
"lsp_lines.nvim": { "branch": "main", "commit": "ec98b45c8280e5ef8c84028d4f38aa447276c002" },
|
||||
"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.nvim": { "branch": "master", "commit": "d8c392dd75778d6258da4e7c55522e94ac389732" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "3751eb5c56c67b51e68a1f4a0da28ae74ab771c1" },
|
||||
"mason.nvim": { "branch": "main", "commit": "a4ebe1f14ba31242cd09f9e0709d5b1f9d2bcecb" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43c7f402cb9822b61b5dc05bf0b385928df256a6" },
|
||||
"mason.nvim": { "branch": "main", "commit": "5ab101aa11849c2424d5b87726105daae8cb49e8" },
|
||||
"neotest": { "branch": "master", "commit": "fee5ce9bdc3dff4706a29b012e75025ab376becb" },
|
||||
"neotest-jest": { "branch": "main", "commit": "8b8926480865e56053681d0c56e3be0a3b5e716c" },
|
||||
"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" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "915558963709ea17c5aa246ca1c9786bfee6ddb4" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "f00eb3b766c370cb34fdabc29c760338ba9e4c6c" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" },
|
||||
"nvim-dap": { "branch": "master", "commit": "700a3c7d6fbe5b07bee74e9952b456120d355c47" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "f2206de65ea39093e3f13992507fc985c17aa763" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b8201fd104287e9c24f898f1f7f5202896eea203" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "b80227ea56a48177786904f6322abc8b2dc0bc36" },
|
||||
"nvim-dap-vscode-js": { "branch": "main", "commit": "e7c05495934a658c8aa10afd995dacd796f76091" },
|
||||
"nvim-lastplace": { "branch": "main", "commit": "ecced899435c6bcdd81becb5efc6d5751d0dc4c8" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7b98aadc6e85db4fc3af6c1ec22c4774d965506e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ed88435764d8b00442e66d39ec3d9c360e560783" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b005821516f1f37801a73067afd1cef2dbc4dfe8" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "6e704cdeb7114385b4b19f9dc4b8f0c442019edc" },
|
||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "677d54afee1dfa7a30eb9e16ab7d9d1affc6484b" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "5fb315df12a3091f241b0326aed0ec70381adbd8" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "6a2065fbcd032075a06d2ab54508b69842bc4496" },
|
||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "a54e6c471ce1cd8ef8357e34598a28a955297131" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "3ce0a8e770f70a135ef969e0a640bd8d05baf42c" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "51d220e0bd8922caabcb3e5de936fc599a1bd210" },
|
||||
"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" },
|
||||
"persisted.nvim": { "branch": "main", "commit": "558fc4b9f48e16008782240521cb72455d93b835" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9d81624fbcedd3dd43b38d7e13a1e7b3f873d8cd" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"promise-async": { "branch": "main", "commit": "842dca33e6b1af7bedcefc72cffbc807d54dbfca" },
|
||||
"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" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "83ec606e7065adf134d17f4af6bae510e3c491c1" },
|
||||
"undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "a09e40664e9cd30cd2b3f8866b796598302070f6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "f4ead480930a37dd2b0cf917a8c387ed36c2d86a" },
|
||||
"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")
|
||||
|
||||
require("luasnip/loaders/from_vscode").lazy_load()
|
||||
@ -13,10 +12,13 @@ require("lspconfig").html.setup({
|
||||
})
|
||||
|
||||
require("nvim-autopairs").setup()
|
||||
require("copilot").setup()
|
||||
require("copilot_cmp").setup({
|
||||
clear_after_cursor = true,
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
require("copilot_cmp").setup {
|
||||
method = "getCompletionsCycling",
|
||||
}
|
||||
|
||||
local check_backspace = function()
|
||||
local col = vim.fn.col(".") - 1
|
||||
|
@ -2,11 +2,12 @@ local mason = require("mason")
|
||||
local mason_lsp = require("mason-lspconfig")
|
||||
local lsp = require("lspconfig")
|
||||
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
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,
|
||||
},
|
||||
})
|
||||
@ -47,8 +48,24 @@ local function on_attach(client, bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
lsp.sumneko_lua.setup({
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true
|
||||
}
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
local custom_lsp = {};
|
||||
|
||||
custom_lsp.tsserver = {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = lsp.util.root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git"),
|
||||
}
|
||||
|
||||
custom_lsp.sumneko_lua = {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
@ -71,32 +88,10 @@ lsp.sumneko_lua.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
lsp.prismals.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.emmet_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.solargraph.setup({
|
||||
filetypes = { "ruby" },
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.elixirls.setup({
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.jsonls.setup({
|
||||
custom_lsp.jsonls = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
@ -133,25 +128,9 @@ lsp.jsonls.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
lsp.svelte.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.tsserver.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.html.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.phpactor.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.intelephense.setup({
|
||||
custom_lsp.intelephense = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
@ -170,24 +149,9 @@ lsp.intelephense.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
lsp.cssls.setup({
|
||||
capabilities = capabilities,
|
||||
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({
|
||||
custom_lsp.rust_analyzer = {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
@ -207,14 +171,9 @@ lsp.rust_analyzer.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
lsp.gopls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.yamlls.setup({
|
||||
custom_lsp.yamlls = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
@ -227,11 +186,11 @@ lsp.yamlls.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
lsp.glslls.setup(require("max.configs.lsp-glsl"))
|
||||
custom_lsp.glslls = require("max.configs.lsp-glsl")
|
||||
|
||||
lsp.ltex.setup({
|
||||
custom_lsp.ltex = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
@ -248,4 +207,17 @@ lsp.ltex.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
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({
|
||||
context_commentstring = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
|
@ -41,8 +41,18 @@ augroup filetypedetect
|
||||
augroup END
|
||||
]])
|
||||
|
||||
autocmd({ "BufReadPost" }, {
|
||||
pattern = "*",
|
||||
group = config_group,
|
||||
command = "filetype detect",
|
||||
-- autocmd({ "BufReadPost" }, {
|
||||
-- pattern = "*",
|
||||
-- group = config_group,
|
||||
-- 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
|
||||
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>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.definition()<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)
|
||||
|
||||
-- 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>ip", ":TroubleToggle<CR>", 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
|
||||
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
|
||||
map("n", "<Leader>gd", ":Gvdiffsplit!<CR>", opts)
|
||||
map("n", "<Leader>gdl", ":diffget //3<CR>", opts)
|
||||
map("n", "<Leader>gdh", ":diffget //2<CR>", opts)
|
||||
|
||||
-- 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)
|
||||
|
||||
-- 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 nocompatible]]) -- Disable compatibility to old-time vi
|
||||
set.mouse = "a" -- Enable mouse support
|
||||
set.signcolumn = "yes"
|
||||
set.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||
|
||||
-- Configure Folds
|
||||
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.title = true -- Show current txt that you editing
|
||||
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
|
||||
vim.cmd("syntax sync minlines=256")
|
||||
set.mousescroll = "ver:1,hor:1"
|
||||
|
@ -13,6 +13,7 @@ local plugins = {
|
||||
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("max.configs.lualine")
|
||||
end,
|
||||
@ -21,9 +22,11 @@ local plugins = {
|
||||
--------------------
|
||||
-- Layout Plugins --
|
||||
--------------------
|
||||
{ 'akinsho/bufferline.nvim', lazy = false, config = true },
|
||||
{ "shortcuts/no-neck-pain.nvim", cmd = "NoNeckPain", config = true },
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
lazy = false,
|
||||
config = true
|
||||
},
|
||||
{
|
||||
@ -34,17 +37,10 @@ local plugins = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"ldelossa/litee.nvim",
|
||||
cmd = "InsertEnter",
|
||||
dependencies = {
|
||||
"ldelossa/litee-symboltree.nvim",
|
||||
"ldelossa/litee-calltree.nvim",
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
config = true,
|
||||
},
|
||||
config = function()
|
||||
require("max.configs.litee")
|
||||
end,
|
||||
},
|
||||
{ "ethanholz/nvim-lastplace", event = "BufReadPre", config = true },
|
||||
{ "mbbill/undotree", lazy = false },
|
||||
{
|
||||
"petertriho/nvim-scrollbar",
|
||||
@ -78,16 +74,15 @@ local plugins = {
|
||||
event = "BufReadPost",
|
||||
dependencies = 'kevinhwang91/promise-async',
|
||||
config = function()
|
||||
require('ufo').setup({
|
||||
provider_selector = function()
|
||||
return { 'treesitter', 'indent' }
|
||||
end
|
||||
})
|
||||
require("ufo").setup()
|
||||
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
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,
|
||||
},
|
||||
{
|
||||
@ -109,7 +104,7 @@ local plugins = {
|
||||
}, -- startup screen
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "BufReadPre",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
@ -119,13 +114,12 @@ local plugins = {
|
||||
---------------------
|
||||
"junegunn/fzf",
|
||||
{
|
||||
"ggandor/flit.nvim",
|
||||
dependencies = {
|
||||
"ggandor/leap.nvim",
|
||||
|
||||
config = function()
|
||||
local leap = require("leap")
|
||||
leap.add_default_mappings()
|
||||
leap.setup({})
|
||||
end,
|
||||
},
|
||||
event = "VimEnter",
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
@ -133,42 +127,28 @@ local plugins = {
|
||||
require("max.configs.telescope")
|
||||
end,
|
||||
},
|
||||
|
||||
---------------
|
||||
-- Lsp Setup --
|
||||
---------------
|
||||
|
||||
{ "glepnir/lspsaga.nvim",
|
||||
cmd = "Lspsaga"
|
||||
}, -- better windows for lsp replace, goto definition etc...
|
||||
{ "VonHeikemen/lsp-zero.nvim",
|
||||
{
|
||||
"glepnir/lspsaga.nvim",
|
||||
event = 'BufRead',
|
||||
config = function()
|
||||
require('lspsaga').setup({})
|
||||
end
|
||||
},
|
||||
{ "neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"arkav/lualine-lsp-progress",
|
||||
"williamboman/mason.nvim",
|
||||
"jose-elias-alvarez/null-ls.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",
|
||||
"rafamadriz/friendly-snippets",
|
||||
{ "lukas-reineke/lsp-format.nvim", config = true },
|
||||
},
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
local lsp = require("lsp-zero")
|
||||
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 }
|
||||
|
||||
require("max.configs.lsp")
|
||||
end },
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
@ -182,16 +162,36 @@ local plugins = {
|
||||
-- Autocomplete --
|
||||
-------------------
|
||||
{ "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",
|
||||
event = "BufReadPre",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("boole").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"gaoDean/autolist.nvim",
|
||||
event = "BufReadPre",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("autolist").setup({})
|
||||
end,
|
||||
@ -204,6 +204,7 @@ local plugins = {
|
||||
event = "BufReadPost",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring"
|
||||
},
|
||||
config = function()
|
||||
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