Clean repo
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
yazi/plugins/
|
||||
lazy-lock.json
|
||||
@@ -1,4 +1,5 @@
|
||||
- defaults:
|
||||
create: true
|
||||
link:
|
||||
relink: true
|
||||
|
||||
@@ -6,19 +7,11 @@
|
||||
|
||||
- link:
|
||||
~/.config/alacritty:
|
||||
create: true
|
||||
path: alacritty
|
||||
~/.config/sway:
|
||||
create: true
|
||||
path: sway
|
||||
~/.config/waybar:
|
||||
create: true
|
||||
path: waybar
|
||||
~/.config/rofi:
|
||||
create: true
|
||||
path: rofi
|
||||
~/.config/yazi:
|
||||
~/.config/nvim:
|
||||
path: nvim
|
||||
~/.zshrc:
|
||||
~/.oh-my-zsh:
|
||||
path: ohmyzsh
|
||||
|
||||
267
lvim/config.lua
267
lvim/config.lua
@@ -1,267 +0,0 @@
|
||||
-- Read the docs: https://www.lunarvim.org/docs/configuration
|
||||
-- Example configs: https://github.com/LunarVim/starter.lvim
|
||||
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
|
||||
-- Forum: https://www.reddit.com/r/lunarvim/
|
||||
-- Discord: https://discord.com/invite/Xb9B4Ny
|
||||
--
|
||||
-- General
|
||||
lvim.log.level = "warn"
|
||||
lvim.format_on_save = false
|
||||
lvim.colorscheme = "onedark"
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "cpp",
|
||||
command = "setlocal shiftwidth=2 tabstop=2"
|
||||
})
|
||||
lvim.builtin.treesitter.ensure_installed = {
|
||||
"lua",
|
||||
"rust",
|
||||
"toml",
|
||||
}
|
||||
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
|
||||
|
||||
-- Keybind
|
||||
lvim.builtin.which_key.mappings["g"].g = { "<cmd>ToggleTerm<cr><cmd>TermExec cmd='gitui&&exit'<CR>", "Gitui" }
|
||||
lvim.builtin.which_key.mappings["s"].B = { "<cmd>Telescope git_branches<CR>", "Checkout branch" }
|
||||
lvim.builtin.which_key.mappings["s"].b = { "<cmd>Telescope buffers<CR>", "Buffer" }
|
||||
lvim.builtin.which_key.mappings["t"] = {
|
||||
name = "+Terminal",
|
||||
r = { "<cmd>ToggleTerm<cr>", "Floating terminal" },
|
||||
y = { "<cmd>ToggleTerm size=60 direction=vertical<cr>", "Split vertical" },
|
||||
t = { "<cmd>ToggleTerm size=15 direction=horizontal<cr>", "Split horizontal" },
|
||||
}
|
||||
|
||||
-- Plugins
|
||||
lvim.plugins = {
|
||||
--RUST
|
||||
"simrat39/rust-tools.nvim",
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
version = "v0.3.0",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("crates").setup {
|
||||
null_ls = {
|
||||
enabled = true,
|
||||
name = "crates.nvim",
|
||||
},
|
||||
popup = {
|
||||
border = "rounded",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{ "slint-ui/vim-slint" },
|
||||
-- General
|
||||
{
|
||||
"j-hui/fidget.nvim",
|
||||
config = function()
|
||||
require("fidget").setup()
|
||||
end,
|
||||
},
|
||||
{ "navarasu/onedark.nvim" },
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{
|
||||
"Pocco81/auto-save.nvim",
|
||||
config = function()
|
||||
require("auto-save").setup()
|
||||
end,
|
||||
},
|
||||
{ 'kevinhwang91/nvim-ufo' },
|
||||
{ 'kevinhwang91/promise-async' },
|
||||
-- Markdonw
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = function() vim.fn["mkdp#util#install"]() end,
|
||||
},
|
||||
}
|
||||
|
||||
-- Themes
|
||||
require('onedark').setup {
|
||||
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
toggle_style_key = "<leader>ss",
|
||||
transparent = false, -- Show/hide background
|
||||
|
||||
code_style = {
|
||||
comments = 'italic',
|
||||
keywords = 'italic,',
|
||||
functions = 'bold',
|
||||
strings = 'none',
|
||||
variables = 'none'
|
||||
},
|
||||
}
|
||||
|
||||
-- folding
|
||||
vim.o.foldcolumn = '2' -- '0' is not bad
|
||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.opt.fillchars = {
|
||||
vert = "▕", -- alternatives │
|
||||
fold = " ",
|
||||
eob = " ", -- suppress ~ at EndOfBuffer
|
||||
diff = "╱", -- alternatives = ⣿ ░ ─
|
||||
msgsep = "‾",
|
||||
foldopen = "",
|
||||
foldsep = "│",
|
||||
foldclose = "",
|
||||
}
|
||||
local fcs = vim.opt.fillchars:get()
|
||||
|
||||
-- Stolen from Akinsho
|
||||
local function get_fold(lnum)
|
||||
if vim.fn.foldlevel(lnum) <= vim.fn.foldlevel(lnum - 1)
|
||||
then
|
||||
return ' '
|
||||
end
|
||||
local fold_sym =
|
||||
vim.fn.foldclosed(lnum) == -1 and fcs.foldopen or fcs.foldclose
|
||||
return fold_sym
|
||||
end
|
||||
_G.get_statuscol = function() return "%s%l " .. get_fold(vim.v.lnum) .. " " end
|
||||
vim.o.statuscolumn = "%!v:lua.get_statuscol()"
|
||||
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true
|
||||
}
|
||||
local language_servers = require("lspconfig").util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
|
||||
for _, ls in ipairs(language_servers) do
|
||||
require('lspconfig')[ls].setup({
|
||||
capabilities = capabilities
|
||||
-- you can add other fields for setting up lsp server in this table
|
||||
})
|
||||
end
|
||||
require('ufo').setup()
|
||||
|
||||
|
||||
|
||||
-- Java
|
||||
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "jdtls" })
|
||||
local lspconfig = require('lspconfig')
|
||||
local lombok = vim.fn.stdpath('data') .. '/mason/packages/jdtls/lombok.jar'
|
||||
lspconfig.jdtls.setup { cmd = { "jdtls", "--jvm-arg=-javaagent:" .. lombok } }
|
||||
|
||||
|
||||
|
||||
-- RUST CONFIG
|
||||
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "rust_analyzer" })
|
||||
|
||||
local mason_path = vim.fn.glob(vim.fn.stdpath "data" .. "/mason/")
|
||||
|
||||
local codelldb_path = mason_path .. "bin/codelldb"
|
||||
local liblldb_path = mason_path .. "packages/codelldb/extension/lldb/lib/liblldb"
|
||||
local this_os = vim.loop.os_uname().sysname
|
||||
|
||||
-- The path in windows is different
|
||||
if this_os:find "Windows" then
|
||||
codelldb_path = mason_path .. "packages\\codelldb\\extension\\adapter\\codelldb.exe"
|
||||
liblldb_path = mason_path .. "packages\\codelldb\\extension\\lldb\\bin\\liblldb.dll"
|
||||
else
|
||||
-- The liblldb extension is .so for linux and .dylib for macOS
|
||||
liblldb_path = liblldb_path .. (this_os == "Linux" and ".so" or ".dylib")
|
||||
end
|
||||
|
||||
pcall(function()
|
||||
require("rust-tools").setup {
|
||||
tools = {
|
||||
executor = require("rust-tools/executors").termopen, -- can be quickfix or termopen
|
||||
reload_workspace_from_cargo_toml = true,
|
||||
runnables = {
|
||||
use_telescope = true,
|
||||
},
|
||||
inlay_hints = {
|
||||
auto = true,
|
||||
only_current_line = false,
|
||||
show_parameter_hints = false,
|
||||
parameter_hints_prefix = "<-",
|
||||
other_hints_prefix = "=>",
|
||||
max_len_align = false,
|
||||
max_len_align_padding = 1,
|
||||
right_align = false,
|
||||
right_align_padding = 7,
|
||||
highlight = "Comment",
|
||||
},
|
||||
hover_actions = {
|
||||
border = "rounded",
|
||||
},
|
||||
on_initialized = function()
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter", "CursorHold", "InsertLeave" }, {
|
||||
pattern = { "*.rs" },
|
||||
callback = function()
|
||||
-- local _, _ = pcall(vim.lsp.codelens.refresh)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
dap = {
|
||||
-- adapter= codelldb_adapter,
|
||||
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path),
|
||||
},
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
require("lvim.lsp").common_on_attach(client, bufnr)
|
||||
local rt = require "rust-tools"
|
||||
vim.keymap.set("n", "K", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
end,
|
||||
|
||||
capabilities = require("lvim.lsp").common_capabilities(),
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
lens = {
|
||||
enable = true,
|
||||
},
|
||||
checkOnSave = {
|
||||
enable = true,
|
||||
command = "clippy",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end)
|
||||
|
||||
lvim.builtin.dap.on_config_done = function(dap)
|
||||
dap.adapters.codelldb = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path)
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<m-d>", "<cmd>RustOpenExternalDocs<Cr>", { noremap = true, silent = true })
|
||||
|
||||
lvim.builtin.which_key.mappings["C"] = {
|
||||
name = "Rust",
|
||||
r = { "<cmd>RustRunnables<Cr>", "Runnables" },
|
||||
t = { "<cmd>lua _CARGO_TEST()<cr>", "Cargo Test" },
|
||||
m = { "<cmd>RustExpandMacro<Cr>", "Expand Macro" },
|
||||
c = { "<cmd>RustOpenCargo<Cr>", "Open Cargo" },
|
||||
p = { "<cmd>RustParentModule<Cr>", "Parent Module" },
|
||||
d = { "<cmd>RustDebuggables<Cr>", "Debuggables" },
|
||||
v = { "<cmd>RustViewCrateGraph<Cr>", "View Crate Graph" },
|
||||
R = {
|
||||
"<cmd>lua require('rust-tools/workspace_refresh')._reload_workspace_from_cargo_toml()<Cr>",
|
||||
"Reload Workspace",
|
||||
},
|
||||
o = { "<cmd>RustOpenExternalDocs<Cr>", "Open External Docs" },
|
||||
y = { "<cmd>lua require'crates'.open_repository()<cr>", "[crates] open repository" },
|
||||
P = { "<cmd>lua require'crates'.show_popup()<cr>", "[crates] show popup" },
|
||||
i = { "<cmd>lua require'crates'.show_crate_popup()<cr>", "[crates] show info" },
|
||||
f = { "<cmd>lua require'crates'.show_features_popup()<cr>", "[crates] show features" },
|
||||
D = { "<cmd>lua require'crates'.show_dependencies_popup()<cr>", "[crates] show dependencies" },
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"NvChad": { "branch": "v2.5", "commit": "6f25b2739684389ca69ea8229386c098c566c408" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" },
|
||||
"auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" },
|
||||
"base46": { "branch": "v2.5", "commit": "fde7a2cd54599e148d376f82980407c2d24b0fa2" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"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" },
|
||||
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
|
||||
"crates.nvim": { "branch": "main", "commit": "1c924d5a9ea3496c4e1a02d0d51388ba809f8468" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "c6fedfd0b1715ee624384b134becec0a7b0a3d28" },
|
||||
"image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"menu": { "branch": "main", "commit": "7769b17c2a131108c02b10e9f844e504aa605cc2" },
|
||||
"minty": { "branch": "main", "commit": "6dce9f097667862537823d515a0250ce58faab05" },
|
||||
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "3d02855468f94bf435db41b661b58ec4f48a06b7" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
||||
"nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" },
|
||||
"nvim-lsp-endhints": { "branch": "main", "commit": "a449f2f27b6b985ff216964572224ce432d94a86" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9962e25a23f0e992116b99a9a6400947d5a7177b" },
|
||||
"nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "d05881f65f0a653db8d830ccc4d2e07d6a720628" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "13f4346876f394973ff676670304a2b734174538" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "edcb48240dcd0d77f3429b1858317acb7f8702b4" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1c9136332840edee0c593f2f4f89598c8ed97f5f" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
|
||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "242e47bc356818b956e685a2e8de1d613caf45bf" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
||||
"ui": { "branch": "v3.0", "commit": "e196e36b088e12b7082e2665a58be15f7d709460" },
|
||||
"venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" },
|
||||
"volt": { "branch": "main", "commit": "3bedb1576db574af160643eea7df3b09dbe5ee9c" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" }
|
||||
}
|
||||
Reference in New Issue
Block a user