new config
This commit is contained in:
parent
ee2563cac6
commit
e3d3ab6680
36 changed files with 262 additions and 611 deletions
|
@ -1,3 +0,0 @@
|
|||
# neovim
|
||||
|
||||
neovim config
|
6
init.lua
6
init.lua
|
@ -1,3 +1,3 @@
|
|||
require("Dario48.options")
|
||||
require("Dario48.colors")
|
||||
require("Dario48.lazy")
|
||||
require("config.lazy")
|
||||
require("config.general")
|
||||
|
||||
|
|
|
@ -1,42 +1,28 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
|
||||
"auto-pairs": { "branch": "master", "commit": "39f06b873a8449af8ff6a3eee716d3da14d63a76" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"codeium.vim": { "branch": "main", "commit": "e0342fde9474fdd0a36ff9692fe0031b7611a19f" },
|
||||
"conform.nvim": { "branch": "master", "commit": "310e2e95a4f832163f3f7a9fedebb1a4afc0db69" },
|
||||
"csvlens.nvim": { "branch": "main", "commit": "987375e2cf6399850f7f801b53b89c981ed652fa" },
|
||||
"fd": { "branch": "master", "commit": "cfced9787ee544d99f36e455762defec87c6be16" },
|
||||
"feline.nvim": { "branch": "main", "commit": "c97c17dc56ca3cf2b9b9192c3447fc59347e8c0d" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "f4928ba14eb6c667786ac7d69927f6aee6719f1e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "5473e3d77c13e40fc4758fa977a1f2c14d0b4ceb" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "02f1055a777264d4b65896051ec28d0f322f7932" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "87701af045b3032515776abeb47eb8c2ddb5e679" },
|
||||
"LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7c493713bc2cb392706866eeba53aaef6c8e9fc6" },
|
||||
"lsp-zero.nvim": { "branch": "v1.x", "commit": "aa36afcf7a59fbd98008c9a434593c423d3d649a" },
|
||||
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
|
||||
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"mason-conform.nvim": { "branch": "main", "commit": "abce2be529f3b4b336c56d0ba6336a9144e0fee6" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"neorg": { "branch": "main", "commit": "efd7bd9c584c206d7aed2c40b02c73a9e5d04e73" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "df75a6a94910ae47854341d6b5a6fd483192c0eb" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "01e08d4bf1c35e5126b2ad5209725e4c552289ab" },
|
||||
"neorg": { "branch": "main", "commit": "0460ccd3b97bc100ca1af0270588b4c76d29c4c4" },
|
||||
"neorg-extras": { "branch": "main", "commit": "e3693be7378d82351d4600ef4a7bc9bc86578b95" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "7557f26defd093c4e9bc17f28b08403f706f5a44" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "5a812abc65d529ea7673059a348814c21d7f87ff" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-tetris": { "branch": "master", "commit": "d17c99fb527ada98ffb0212ffc87ccda6fd4f7d9" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "f9ff00bc06d7cb70548a3847d7a2a05e928bc988" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "7a38515741768c0a0712253de4ce64454cb24c1a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||
"pathlib.nvim": { "branch": "main", "commit": "7a5a6facd29e306bc73a37719fa67c0d2226f852" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "cd55bf6aab3f88c259fa29ea86bbdcb1a325687d" },
|
||||
"tree-sitter-hyprlang": { "branch": "master", "commit": "6858695eba0e63b9e0fceef081d291eb352abce8" },
|
||||
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "df77add576a1b2b7c6956be0b07d3c753f034b54" }
|
||||
"nvim-treesitter": { "branch": "master", "commit": "2a496fa4e89034014dd054f04c061ba7d6023a0c" },
|
||||
"pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
||||
"vim-jukit": { "branch": "master", "commit": "73214c9a8abc4b6aa7a6266b5bc2ddbf8b3e3c00" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
vim.api.nvim_create_namespace("top_of_mlm")
|
||||
vim.api.nvim_create_namespace("top_middle_of_mlm")
|
||||
vim.api.nvim_create_namespace("middle_of_mlm")
|
||||
vim.api.nvim_create_namespace("bottom_middle_of_mlm")
|
||||
vim.api.nvim_create_namespace("bottom_of_mlm")
|
||||
|
||||
vim.api.nvim_set_hl(0, "top_of_mlm", {fg = "#078d70"})
|
||||
vim.api.nvim_set_hl(0, "top_middle_of_mlm", {fg = "#98e8c1"})
|
||||
vim.api.nvim_set_hl(0, "middle_of_mlm", {fg = "#ffffff"})
|
||||
vim.api.nvim_set_hl(0, "bottom_middle_of_mlm", {fg = "#7bade2"})
|
||||
vim.api.nvim_set_hl(0, "bottom_of_mlm", {fg = "#3d1a78"})
|
|
@ -1,14 +0,0 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup({ import = "Dario48/plugins" })
|
||||
vim.keymap.set("n", "<leader>l", ":Lazy <CR>")
|
|
@ -1,36 +0,0 @@
|
|||
vim.cmd("nnoremap <Space> <Nop>")
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 0
|
||||
vim.opt.shiftwidth = 0
|
||||
vim.opt.shell = "/bin/bash"
|
||||
vim.cmd("set wrap smoothscroll")
|
||||
|
||||
vim.keymap.set("n", "<leader>+x", ":!chmod +x %<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>+r", ":!chmod +r %<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>+w", ":!chmod +w %<CR>", { silent = true })
|
||||
|
||||
vim.keymap.set("n", "<leader>-x", ":!chmod -x %<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>-r", ":!chmod -r %<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>-w", ":!chmod -w %<CR>", { silent = true })
|
||||
|
||||
vim.opt.rnu = true
|
||||
vim.opt.nu = true
|
||||
|
||||
vim.cmd([[set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:•]])
|
||||
vim.keymap.set("n", "<leader>hc", ":set list!<CR>", { silent = true })
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.opt.scrolloff = 6
|
||||
|
||||
vim.keymap.set("v", "<leader>yo", ":yank +", { silent = true })
|
||||
vim.keymap.set("v", "<leader>ya", ":yank *", { silent = true })
|
||||
|
||||
vim.cmd("nnoremap j gj")
|
||||
vim.cmd("nnoremap k gk")
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
'ThePrimeagen/vim-be-good',
|
||||
keys ={{"<leader>vbg", ":VimBeGood <CR>", desc = "VimBeGood"}}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
return {
|
||||
'goolord/alpha-nvim',
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.startify")
|
||||
|
||||
-- Set header
|
||||
dashboard.section.header.val = {
|
||||
[[ /\\\\\ /\\\ /\\\\\\\\\\\\\\\ /\\\\\ /\\\ /\\\ /\\\\\\\\\\\ /\\\\ /\\\\ ]],
|
||||
[[ \ \\\\\\ \ \\\ \ \\\/////////// /\\\///\\\ \ \\\ \ \\\ \/////\\\/// \ \\\\\\ /\\\\\\ ]],
|
||||
[[ \ \\\/\\\ \ \\\ \ \\\ /\\\/ \///\\\ \//\\\ /\\\ \ \\\ \ \\\//\\\ /\\\//\\\ ]],
|
||||
[[ \ \\\//\\\ \ \\\ \ \\\\\\\\\\\ /\\\ \//\\\ \//\\\ /\\\ \ \\\ \ \\\\///\\\/\\\/ \ \\\ ]],
|
||||
[[ \ \\\\//\\\\ \\\ \ \\\/////// \ \\\ \ \\\ \//\\\ /\\\ \ \\\ \ \\\ \///\\\/ \ \\\ ]],
|
||||
[[ \ \\\ \//\\\ \\\ \ \\\ \//\\\ /\\\ \//\\\/\\\ \ \\\ \ \\\ \/// \ \\\ ]],
|
||||
[[ \ \\\ \//\\\\\\ \ \\\ \///\\\ /\\\ \//\\\\\ \ \\\ \ \\\ \ \\\ ]],
|
||||
[[ \ \\\ \//\\\\\ \ \\\\\\\\\\\\\\\ \///\\\\\/ \//\\\ /\\\\\\\\\\\ \ \\\ \ \\\ ]],
|
||||
[[ \/// \///// \/////////////// \///// \/// \/////////// \/// \/// ]],
|
||||
}
|
||||
|
||||
dashboard.section.header.opts.hl = {
|
||||
{'top_of_mlm', 1, 118},
|
||||
{'top_of_mlm', 121, 238},
|
||||
{'top_middle_of_mlm', 241, 358},
|
||||
{'top_middle_of_mlm', 361, 478},
|
||||
{'middle_of_mlm', 481, 598},
|
||||
{'bottom_middle_of_mlm', 601, 718},
|
||||
{'bottom_middle_of_mlm', 721, 838},
|
||||
{'bottom_of_mlm', 841, 958},
|
||||
{'bottom_of_mlm', 961, 1078},
|
||||
}
|
||||
-- Set menu
|
||||
dashboard.section.buttons= {
|
||||
type = "group",
|
||||
val = {
|
||||
{ type = "text", val = "Quick links", opts = { hl = "SpecialComment", position = "center" } },
|
||||
{ type = "padding", val = 1 },
|
||||
dashboard.button("e", " New file", "<cmd>ene<CR>"),
|
||||
dashboard.button("u", " Update plugins", "<cmd>Lazy sync<CR>"),
|
||||
dashboard.button("q", " Quit", "<cmd>qa<CR>"),
|
||||
},
|
||||
position = "center",
|
||||
}
|
||||
-- Send config to alpha
|
||||
alpha.setup(dashboard.opts)
|
||||
|
||||
-- Disable folding on alpha buffer
|
||||
vim.cmd([[
|
||||
autocmd FileType alpha setlocal nofoldenable
|
||||
]])
|
||||
end
|
||||
};
|
|
@ -1,14 +0,0 @@
|
|||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
event = {'BufReadPre', 'BufNewFile'},
|
||||
version = "*",
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
require("bufferline").setup()
|
||||
end,
|
||||
keys = {
|
||||
{"<leader>bb", "<cmd>bNext <CR>", desc = "next buffer"},
|
||||
{"<leader>bd", "<cmd>bdelete <CR>", desc = "delete buffer"},
|
||||
{"<leader>bl", "<cmd>blast <CR>", desc = "last buffer"},
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
return {
|
||||
"Exafunction/codeium.vim",
|
||||
event = "BufEnter",
|
||||
config = function()
|
||||
vim.g.codeium_disable_bindings = 1
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<c-l>",
|
||||
function()
|
||||
return vim.fn["codeium#Accept"]()
|
||||
end,
|
||||
{ expr = true, silent = true },
|
||||
},
|
||||
{
|
||||
"<c-;>",
|
||||
function()
|
||||
return vim.fn["codeium#CycleCompletions"](1)
|
||||
end,
|
||||
{ expr = true, silent = true },
|
||||
},
|
||||
{
|
||||
"<s-c-,>",
|
||||
function()
|
||||
return vim.fn["codeium#CycleCompletions"](-1)
|
||||
end,
|
||||
{ expr = true, silent = true },
|
||||
},
|
||||
{
|
||||
"<s-c-x>",
|
||||
function()
|
||||
return vim.fn["codeium#Clear"]()
|
||||
end,
|
||||
{ expr = true, silent = true },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
cmd = "Conform",
|
||||
config = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
cpp = { "clang-format" },
|
||||
fish = { "fish_indent" },
|
||||
css = { "prettier" },
|
||||
scss = { "prettier" },
|
||||
js = { "prettier" },
|
||||
json = { "prettier" },
|
||||
html = { "prettier" },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
formatters = {
|
||||
prettier = {
|
||||
prepend_args = { "--config=/home/Dario48/.config/.prettierrc" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"zapling/mason-conform.nvim",
|
||||
dependencies = { "mason.nvim", "conform.nvim" },
|
||||
config = true,
|
||||
},
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
return {
|
||||
"theKnightsOfRohan/csvlens.nvim",
|
||||
dependencies = {
|
||||
"akinsho/toggleterm.nvim"
|
||||
},
|
||||
config = true,
|
||||
opts = { --[[ Place your opts here ]] }
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
'freddiehaddad/feline.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'lewis6991/gitsigns.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('feline').setup()
|
||||
end
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
|
||||
{ -- optional completion source for require statements and module annotations
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
opts.sources = opts.sources or {}
|
||||
table.insert(opts.sources, {
|
||||
name = "lazydev",
|
||||
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v3.x",
|
||||
lazy = true,
|
||||
config = false,
|
||||
init = function()
|
||||
-- Disable automatic setup, we are doing it manually
|
||||
vim.g.lsp_zero_extend_cmp = 0
|
||||
vim.g.lsp_zero_extend_lspconfig = 0
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>m", ":Mason <CR>", desc = "open mason" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Autocompletion
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
{ "L3MON4D3/LuaSnip" },
|
||||
},
|
||||
config = function()
|
||||
-- Here is where you configure the autocompletion settings.
|
||||
local lsp_zero = require("lsp-zero")
|
||||
lsp_zero.extend_cmp()
|
||||
|
||||
-- And you can configure cmp even more, if you want to.
|
||||
local cmp = require("cmp")
|
||||
local cmp_action = lsp_zero.cmp_action()
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
},
|
||||
formatting = lsp_zero.cmp_format(),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
[" "] = cmp.mapping.confirm({ select = false }),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-f>"] = cmp_action.luasnip_jump_forward(),
|
||||
["<C-b>"] = cmp_action.luasnip_jump_backward(),
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- LSP
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
cmd = { "LspInfo", "LspInstall", "LspStart" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
},
|
||||
config = function()
|
||||
-- This is where all the LSP shenanigans will live
|
||||
local lsp_zero = require("lsp-zero")
|
||||
lsp_zero.extend_lspconfig()
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition()
|
||||
end, { buffer = bufnr, remap = false })
|
||||
vim.keymap.set("n", "<leader>ca", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, { buffer = bufnr, remap = false })
|
||||
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||
end)
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {},
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
lua_ls = function()
|
||||
-- (Optional) Configure lua language server for neovim
|
||||
local lua_opts = lsp_zero.nvim_lua_ls()
|
||||
require("lspconfig").lua_ls.setup(lua_opts)
|
||||
require("lspconfig").ltex.setup({})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>qf",
|
||||
function()
|
||||
vim.lsp.buf.code_action()
|
||||
end,
|
||||
silent = true,
|
||||
desc = "quickfix",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"vhyrro/luarocks.nvim",
|
||||
priority = 1000, -- Very high priority is required, luarocks.nvim should run as the first plugin in your config.
|
||||
config = true,
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
return {
|
||||
"nvim-neorg/neorg",
|
||||
dependencies = { "luarocks.nvim" },
|
||||
lazy = true, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
opts = {
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.concealer"] = {},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
school = "~/Documents/school",
|
||||
notes = "~/Documents/notes",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
ft = "norg",
|
||||
cmd = "Neorg"
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
return {
|
||||
"EdenEast/nightfox.nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local nightfox = require("nightfox")
|
||||
nightfox.setup({
|
||||
transparent = true
|
||||
})
|
||||
nightfox.load()
|
||||
vim.opt.termguicolors = true
|
||||
vim.cmd("colorscheme carbonfox")
|
||||
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
keys = {
|
||||
{"<leader>dt", function() require'dap'.toggle_breakpoint() end, {silent = true}, desc = "toggle breakpoint"},
|
||||
{"<leader>dc", function() require'dap'.continue() end, {silent = true}, desc = "debug continue"},
|
||||
{"<leader>dso", function() require'dap'.step_over() end, {silent = true}, desc = "debug step over"},
|
||||
{"<leader>dsi", function() require'dap'.step_into() end, {silent = true}, desc = "debug step into"}
|
||||
},
|
||||
init = function()
|
||||
local dap = require'dap'
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path
|
||||
name = 'lldb'
|
||||
}
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = 'Launch',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
args = {function()
|
||||
return vim.fn.input('Runtime args: ', vim.fn.getcwd())
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.zig = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
end
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"},
|
||||
config = function()
|
||||
require("dapui").setup()
|
||||
end,
|
||||
keys = {
|
||||
{"<leader>du", "<cmd>lua require\"dapui\".toggle()", desc = "open dapui"}
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"alec-gibson/nvim-tetris"
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
dependencies = {'nvim-tree/nvim-web-devicons'},
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- disable netrw at the very start of your init.lua
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- set termguicolors to enable highlight groups
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
-- empty setup using defaults
|
||||
require("nvim-tree").setup{
|
||||
renderer = {
|
||||
-- These icons are visible when you install web-devicons
|
||||
icons = {
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
folder = {
|
||||
arrow_open = "",
|
||||
arrow_closed = "",
|
||||
default = "",
|
||||
open = "",
|
||||
empty = "",
|
||||
empty_open = "",
|
||||
symlink = " ",
|
||||
symlink_open = " ",
|
||||
},
|
||||
git = {
|
||||
unstaged = " ",
|
||||
staged = " ",
|
||||
unmerged = " ",
|
||||
renamed = " ➜",
|
||||
untracked = " ",
|
||||
deleted = " ",
|
||||
ignored = " ◌",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{"<leader>ee", ":NvimTreeToggle <CR>", { silent = true }},
|
||||
{"<leader>ef", ":NvimTreeOpen <CR>", { silent = true }},
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
--[[ "nyoom-engineering/oxocarbon.nvim",
|
||||
config = function ()
|
||||
vim.opt.background = "dark"
|
||||
vim.cmd("colorscheme oxocarbon")
|
||||
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end ]]--
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
return{
|
||||
'andweeb/presence.nvim',
|
||||
config = function ()
|
||||
-- The setup config table shows all available config options with their default values:
|
||||
require("presence").setup({
|
||||
-- General options
|
||||
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
|
||||
main_image = "neovim", -- Main image display (either "neovim" or "file")
|
||||
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
|
||||
show_time = true, -- Show the timer
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
|
||||
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
|
||||
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
|
||||
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||
})
|
||||
end
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', "sharkdp/fd", "nvim-tree/nvim-web-devicons" },
|
||||
keys = {
|
||||
{'<leader>ff', "<cmd>Telescope find_files<cr>", desc = "find files"},
|
||||
{'<leader>fs', function()
|
||||
require('telescope.builtin').grep_string({search = vim.fn.input("What to grep? ")})
|
||||
end, "grep something"}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })()
|
||||
end,
|
||||
config = function ()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = { enable = true, additional_vim_regex_highlighting = false },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hyprlang",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {}
|
||||
}
|
21
lua/config/general.lua
Normal file
21
lua/config/general.lua
Normal file
|
@ -0,0 +1,21 @@
|
|||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 0
|
||||
vim.opt.shiftwidth = 0
|
||||
vim.opt.shell = "/bin/bash"
|
||||
vim.cmd("set wrap smoothscroll")
|
||||
|
||||
vim.opt.rnu = true
|
||||
vim.opt.nu = true
|
||||
|
||||
vim.cmd([[set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:•]])
|
||||
vim.keymap.set("n", "<leader>hc", ":set list!<CR>", { silent = true })
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.opt.scrolloff = 6
|
||||
|
||||
vim.cmd("nnoremap j gj")
|
||||
vim.cmd("nnoremap k gk")
|
28
lua/config/lazy.lua
Normal file
28
lua/config/lazy.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.cmd("nnoremap <Space> <Nop>")
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
vim.keymap.set("n", "<leader>l", function() require"lazy".home() end, { silent = true, desc = "open lazy.nvim"})
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup("plugins")
|
39
lua/plugins/lspconfig.lua
Normal file
39
lua/plugins/lspconfig.lua
Normal file
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'hrsh7th/nvim-cmp'},
|
||||
},
|
||||
config = function()
|
||||
-- Reserve a space in the gutter
|
||||
-- This will avoid an annoying layout shift in the screen
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Add cmp_nvim_lsp capabilities settings to lspconfig
|
||||
-- This should be executed before you configure any language server
|
||||
local lspconfig_defaults = require('lspconfig').util.default_config
|
||||
lspconfig_defaults.capabilities = vim.tbl_deep_extend(
|
||||
'force',
|
||||
lspconfig_defaults.capabilities,
|
||||
require('cmp_nvim_lsp').default_capabilities()
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
desc = 'LSP actions',
|
||||
callback = function(event)
|
||||
local opts = {buffer = event.buf}
|
||||
|
||||
vim.keymap.set('n', 'K', function () vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set('n', 'gd', function () vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set('n', 'gD', function () vim.lsp.buf.declaration() end, opts)
|
||||
vim.keymap.set('n', 'gi', function () vim.lsp.buf.implementation() end, opts)
|
||||
vim.keymap.set('n', 'go', function () vim.lsp.buf.type_definition() end, opts)
|
||||
vim.keymap.set('n', 'gr', function () vim.lsp.buf.references() end, opts)
|
||||
vim.keymap.set('n', 'gs', function () vim.lsp.buf.signature_help() end, opts)
|
||||
vim.keymap.set('n', '<F2>', function () vim.lsp.buf.rename() end, opts)
|
||||
vim.keymap.set({'n', 'x'}, '<F3>', function () vim.lsp.buf.format({async = true}) end, opts)
|
||||
vim.keymap.set('n', '<F4>', function () vim.lsp.buf.code_action() end, opts)
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
25
lua/plugins/mason.lua
Normal file
25
lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
||||
dependencies = {"williamboman/mason-lspconfig.nvim"},
|
||||
|
||||
keys = {
|
||||
{ "<leader>m", ":Mason <CR>", desc = "open mason" },
|
||||
},
|
||||
config = true;
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = {'lua_ls', 'pyright'},
|
||||
handlers = {
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup({})
|
||||
end,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
37
lua/plugins/neorg.lua
Normal file
37
lua/plugins/neorg.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
return {
|
||||
"nvim-neorg/neorg",
|
||||
lazy = true, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
dependencies = {
|
||||
{
|
||||
"juniorsundar/neorg-extras",
|
||||
-- tag = "v0.3.1" -- Always a safe bet to track current latest release
|
||||
},
|
||||
"nvim-telescope/telescope.nvim", -- Required for the Neorg-Roam features
|
||||
"nvim-lua/plenary.nvim", -- Required as part of Telescope installation
|
||||
},
|
||||
opts = {
|
||||
load = {
|
||||
["external.many-mans"] = {
|
||||
config = {
|
||||
metadata_fold = true, -- If want @data property ... @end to fold
|
||||
code_fold = true, -- If want @code ... @end to fold
|
||||
}
|
||||
},
|
||||
["core.defaults"] = {},
|
||||
["core.concealer"] = { config = { folds = false } },
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
school = "~/Documents/school",
|
||||
notes = "~/Documents/notes",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
},
|
||||
["core.completion"] = { config = { engine = "nvim-cmp" } },
|
||||
},
|
||||
},
|
||||
ft = "norg",
|
||||
cmd = "Neorg",
|
||||
config = true,
|
||||
}
|
6
lua/plugins/nightfox.lua
Normal file
6
lua/plugins/nightfox.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"EdenEast/nightfox.nvim",
|
||||
init = function()
|
||||
vim.cmd("colorscheme carbonfox")
|
||||
end
|
||||
}
|
33
lua/plugins/nvim-cmp.lua
Normal file
33
lua/plugins/nvim-cmp.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'neovim/nvim-lspconfig'
|
||||
},
|
||||
config= function()
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
{ name = "neorg" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
-- You need Neovim v0.10 to use vim.snippet
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<S-NL>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-S-K>'] = cmp.mapping.scroll_docs(-4),
|
||||
[' '] = cmp.mapping.confirm(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
})
|
||||
end
|
||||
}
|
39
lua/plugins/treesitter.lua
Normal file
39
lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
|
||||
ensure_installed = { "c", "lua", "norg"},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = true,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = {"norg"}
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
}
|
5
lua/plugins/vim-jukit.lua
Normal file
5
lua/plugins/vim-jukit.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
"luk400/vim-jukit",
|
||||
lazu = true,
|
||||
ft = "ipynb",
|
||||
}
|
3
lua/plugins/which-key.lua
Normal file
3
lua/plugins/which-key.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue