Compare commits
10 Commits
9ed93191d7
...
f0a54c0fa8
Author | SHA1 | Date | |
---|---|---|---|
f0a54c0fa8
|
|||
85f8a9695a
|
|||
54b56d22be
|
|||
6c4eb08d89
|
|||
072121b538
|
|||
fa7579dd44
|
|||
16606b79d3
|
|||
61b3885595
|
|||
a25ddce9cb
|
|||
bbc65b11bb
|
@@ -12,3 +12,8 @@
|
||||
gpgsign = true
|
||||
[tag]
|
||||
gpgsign = true
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
|
37
nvim/.config/nvim/init.lua
Normal file
37
nvim/.config/nvim/init.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- bootstrap lazy and all plugins
|
||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
|
||||
if not vim.uv.fs_stat(lazypath) then
|
||||
local repo = "https://github.com/folke/lazy.nvim.git"
|
||||
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
local lazy_config = require "configs.lazy"
|
||||
|
||||
-- load plugins
|
||||
require("lazy").setup({
|
||||
{
|
||||
"NvChad/NvChad",
|
||||
lazy = false,
|
||||
branch = "v2.5",
|
||||
import = "nvchad.plugins",
|
||||
},
|
||||
|
||||
{ import = "plugins" },
|
||||
}, lazy_config)
|
||||
|
||||
-- load theme
|
||||
dofile(vim.g.base46_cache .. "defaults")
|
||||
dofile(vim.g.base46_cache .. "statusline")
|
||||
|
||||
require "options"
|
||||
require "nvchad.autocmds"
|
||||
|
||||
vim.schedule(function()
|
||||
require "mappings"
|
||||
end)
|
41
nvim/.config/nvim/lazy-lock.json
Normal file
41
nvim/.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "3d5bced1b9ae69fa3f9b1942e28af5dbc537f946" },
|
||||
"NvChad": { "branch": "v2.5", "commit": "29ebe31ea6a4edf351968c76a93285e6e108ea08" },
|
||||
"base46": { "branch": "v3.0", "commit": "cee12a263602cc97652d3dd55f0fc5e171012967" },
|
||||
"cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"codesnap.nvim": { "branch": "main", "commit": "be6d6b9a3b5e6999edbda76b16dace03d9bfcd3d" },
|
||||
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
|
||||
"crates.nvim": { "branch": "main", "commit": "c915ab5334a46178f64ce17ab606a79454bcd14f" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "b01433169be710d6c69f7b4ee264d9670698b831" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"mason.nvim": { "branch": "main", "commit": "197f6352c276bbc2d25541dfce00ec50d1a4e88f" },
|
||||
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
|
||||
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "543ed3cac212dc3993ef9f042f6c0812e34ddd43" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "5c0e241bdbd208b7ae546009378d6bc93c083ef3" },
|
||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
||||
"sonarlint.nvim": { "branch": "main", "commit": "060df51352f9fb876d4ff43b8cd4b669a6bdfd89" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"ui": { "branch": "v3.0", "commit": "dc4950f5bd4117e2da108b681506c908b93d4a62" },
|
||||
"volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
47
nvim/.config/nvim/lua/chadrc.lua
Normal file
47
nvim/.config/nvim/lua/chadrc.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
||||
-- Please read that file to know all available options :(
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "everforest",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
-- M.nvdash = { load_on_startup = true }
|
||||
-- M.ui = {
|
||||
-- tabufline = {
|
||||
-- lazyload = false
|
||||
-- }
|
||||
--}
|
||||
--
|
||||
M.mason = {
|
||||
pkgs = {
|
||||
"typescript-language-server",
|
||||
"eslint-lsp",
|
||||
"lua-language-server",
|
||||
"html-lsp",
|
||||
"pyright",
|
||||
"mypy",
|
||||
"ruff",
|
||||
"gopls",
|
||||
"goimports",
|
||||
"debugpy",
|
||||
"rust-analyzer",
|
||||
"codelldb",
|
||||
"tailwindcss-language-server",
|
||||
"golangci-lint-langserver",
|
||||
"typescript-language-server",
|
||||
"sonarlint-language-server",
|
||||
"lua-language-server",
|
||||
"clangd",
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
20
nvim/.config/nvim/lua/configs/conform.lua
Normal file
20
nvim/.config/nvim/lua/configs/conform.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
go = { "gopls" },
|
||||
ts = { "prettier" },
|
||||
tsx = { "prettier" },
|
||||
js = { "prettier" },
|
||||
jsx = { "prettier" }
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
47
nvim/.config/nvim/lua/configs/lazy.lua
Normal file
47
nvim/.config/nvim/lua/configs/lazy.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
defaults = { lazy = true },
|
||||
install = { colorscheme = { "nvchad" } },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = " ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
107
nvim/.config/nvim/lua/configs/lspconfig.lua
Normal file
107
nvim/.config/nvim/lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,107 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = { "html", "cssls" }
|
||||
local nvlsp = require("nvchad.configs.lspconfig")
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
})
|
||||
end
|
||||
|
||||
lspconfig.gopls.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
cmd = { "gopls" },
|
||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||
settings = {
|
||||
completeUnimported = true,
|
||||
usePlaceholders = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.ts_ls.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
init_options = {
|
||||
preferences = {
|
||||
disableSuggestions = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.tailwindcss.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
})
|
||||
|
||||
lspconfig.pyright.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
filetypes = { "python" },
|
||||
})
|
||||
|
||||
lspconfig.eslint.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
})
|
||||
|
||||
lspconfig.golangcilsp = {
|
||||
default_config = {
|
||||
cmd = { "golangci-lint-langserver" },
|
||||
root_dir = lspconfig.util.root_pattern(".git", "go.mod"),
|
||||
init_options = {
|
||||
command = {
|
||||
"golangci-lint",
|
||||
"run",
|
||||
"--output.json.path",
|
||||
"stdout",
|
||||
"--show-stats=false",
|
||||
"--issues-exit-code=1",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.golangci_lint_ls.setup({
|
||||
filetypes = { "go", "gomod" },
|
||||
})
|
||||
|
||||
lspconfig.clangd.setup({
|
||||
filetypes = { "c" },
|
||||
})
|
||||
|
||||
require("sonarlint").setup({
|
||||
server = {
|
||||
cmd = {
|
||||
"sonarlint-language-server",
|
||||
-- Ensure that sonarlint-language-server uses stdio channel
|
||||
"-stdio",
|
||||
"-analyzers",
|
||||
vim.fn.expand("$MASON/share/nvim/mason/share/sonarlint-analyzers/sonargo.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarpython.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarjs.jar"),
|
||||
},
|
||||
settings = {
|
||||
sonarlint = {
|
||||
test = "test",
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
"python",
|
||||
"go",
|
||||
"javascript",
|
||||
"typescript",
|
||||
},
|
||||
})
|
@@ -1,9 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
M.ui = { theme = 'catppuccin', tabufline= {enabled= false} }
|
||||
M.plugins = "custom.plugins"
|
||||
M.mappings = require "custom.configs.mappings"
|
||||
vim.opt.spelllang = 'en_gb'
|
||||
vim.opt.spell = true
|
||||
|
||||
return M
|
@@ -1,36 +0,0 @@
|
||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local util = require "lspconfig/util"
|
||||
|
||||
lspconfig.gopls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
cmd= {"gopls"},
|
||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
|
||||
settings = {
|
||||
completeUnimported = true,
|
||||
usePlaceholders = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.tsserver.setup{
|
||||
on_attach=on_attach,
|
||||
capabilities=capabilities,
|
||||
init_options = {
|
||||
preferences = {
|
||||
disableSuggestions = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.pyright.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes= {"python"},
|
||||
})
|
@@ -1,48 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
M.dap = {
|
||||
plugin = true,
|
||||
n = {
|
||||
["<leader>db"] = {
|
||||
"<cmd> DapToggleBreakpoint <CR>",
|
||||
"Add breakpoint at line"
|
||||
},
|
||||
["<leader>dus"] = {
|
||||
function ()
|
||||
local widgets = require("dap.ui.widgets");
|
||||
local sidebar = widgets.sidebar(widgets.scopes);
|
||||
sidebar.open();
|
||||
end,
|
||||
"open debugging sidebar"
|
||||
}
|
||||
}
|
||||
}
|
||||
M.dap_go = {
|
||||
plugin=true,
|
||||
n = {
|
||||
["<leader>gdt"] = {
|
||||
function()
|
||||
require("dap-go").debug_test()
|
||||
end,
|
||||
"Debug go test"
|
||||
},
|
||||
["<leader>gdl"] = {
|
||||
function()
|
||||
require("dap-go").debug_last()
|
||||
end,
|
||||
"Debug last go test"
|
||||
}
|
||||
}
|
||||
}
|
||||
M.dapui = {
|
||||
n = {
|
||||
["<leader>dui"] = {
|
||||
function()
|
||||
require("dapui").toggle()
|
||||
end,
|
||||
"Open debuging ui"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return M
|
@@ -1,29 +0,0 @@
|
||||
local null_ls = require("null-ls")
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local opts = {
|
||||
sources = {
|
||||
null_ls.builtins.formatting.gofmt,
|
||||
null_ls.builtins.formatting.goimports,
|
||||
null_ls.builtins.diagnostics.mypy,
|
||||
null_ls.builtins.diagnostics.ruff,
|
||||
null_ls.builtins.formatting.eslint,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
return opts
|
@@ -1,9 +0,0 @@
|
||||
|
||||
local null_ls = require("null-ls")
|
||||
local opts = {
|
||||
sources = {
|
||||
null_ls.builtins.diagnostics.mypy,
|
||||
null_ls.builtins.diagnostics.ruff,
|
||||
},
|
||||
}
|
||||
return opts
|
@@ -1,25 +0,0 @@
|
||||
local null_ls = require("null-ls")
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local opts = {
|
||||
sources = {
|
||||
null_ls.builtins.formatting.eslint,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
return opts
|
@@ -1,80 +0,0 @@
|
||||
local plugins = {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"typescript-language-server",
|
||||
"eslint-lsp",
|
||||
"lua-language-server",
|
||||
"html-lsp",
|
||||
"pyright",
|
||||
"mypy",
|
||||
"ruff",
|
||||
"gopls",
|
||||
"goimports",
|
||||
"debugpy",
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config=function ()
|
||||
require "plugins.configs.lspconfig"
|
||||
require "custom.configs.lspconfig"
|
||||
end,
|
||||
},{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
ft = "go",
|
||||
opts = function()
|
||||
return require "custom.configs.null-ls-go"
|
||||
end,
|
||||
}, {
|
||||
"mfussenegger/nvim-dap",
|
||||
init = function()
|
||||
require("core.utils").load_mappings("dap")
|
||||
end
|
||||
}, {
|
||||
"leoluz/nvim-dap-go",
|
||||
ft = "go",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function (_, opts)
|
||||
require("dap-go").setup(opts)
|
||||
require("core.utils").load_mappings("dap_go")
|
||||
require('dap.ext.vscode').load_launchjs(nil, {})
|
||||
end
|
||||
},{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
ft = "python",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function (_, opts)
|
||||
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
|
||||
require("dap-python").setup(path)
|
||||
end
|
||||
},
|
||||
{
|
||||
"NVChad/nvim-autopairs",
|
||||
enabled = false
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
init = function()
|
||||
require("dapui").setup()
|
||||
vim.fn.sign_define('DapBreakpoint', { text = '🐞' })
|
||||
vim.fn.sign_define('DapBreakpointRejected', { text = '🐞' })
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
return plugins
|
25
nvim/.config/nvim/lua/mappings.lua
Normal file
25
nvim/.config/nvim/lua/mappings.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
require("nvchad.mappings")
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", "]g", function()
|
||||
vim.diagnostic.jump({ count = 1, float = true })
|
||||
end)
|
||||
|
||||
map("n", "[g", function()
|
||||
vim.diagnostic.jump({ count = -1, float = true })
|
||||
end)
|
||||
|
||||
map("n", "<leader>ww", function()
|
||||
vim.diagnostic.open_float()
|
||||
end)
|
||||
|
||||
map("n", "<leader>of", ":browse oldfiles\n")
|
||||
|
||||
map("n", "]t", function()
|
||||
require("todo-comments").jump_next()
|
||||
end, { desc = "Next todo comment" })
|
||||
|
||||
map("n", "[t", function()
|
||||
require("todo-comments").jump_prev()
|
||||
end, { desc = "Previous todo comment" })
|
1
nvim/.config/nvim/lua/options.lua
Normal file
1
nvim/.config/nvim/lua/options.lua
Normal file
@@ -0,0 +1 @@
|
||||
require "nvchad.options"
|
127
nvim/.config/nvim/lua/plugins/init.lua
Normal file
127
nvim/.config/nvim/lua/plugins/init.lua
Normal file
@@ -0,0 +1,127 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "BufWritePre", -- uncomment for format on save
|
||||
opts = require("configs.conform"),
|
||||
},
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "Avante" },
|
||||
},
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("configs.lspconfig")
|
||||
end,
|
||||
},
|
||||
{ "nvim-neotest/nvim-nio" },
|
||||
{
|
||||
"mistricky/codesnap.nvim",
|
||||
build = "make build_generator",
|
||||
keys = {
|
||||
{ "<leader>cc", "<cmd>CodeSnap<cr>", mode = "x", desc = "Save selected code snapshot into clipboard" },
|
||||
{ "<leader>cs", "<cmd>CodeSnapSave<cr>", mode = "x", desc = "Save selected code snapshot in ~/Pictures" },
|
||||
},
|
||||
opts = {
|
||||
save_path = "~/Pictures",
|
||||
has_breadcrumbs = false,
|
||||
bg_theme = "bamboo",
|
||||
watermark = "",
|
||||
mac_window_bar = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
ft = "go",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function(_, opts)
|
||||
require("dap-go").setup(opts)
|
||||
-- require("core.utils").load_mappings("dap_go")
|
||||
require("dap.ext.vscode").load_launchjs(nil, {})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
ft = "python",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function(_, _)
|
||||
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
|
||||
require("dap-python").setup(path)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"NVChad/nvim-autopairs",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^5", -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
{
|
||||
"rust-lang/rust.vim",
|
||||
ft = "rust",
|
||||
init = function()
|
||||
vim.g.rustfmt_autosave = 1
|
||||
end,
|
||||
},
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
ft = { "rust", "toml" },
|
||||
config = function(_, opts)
|
||||
local crates = require("crates")
|
||||
crates.setup(opts)
|
||||
crates.show()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
init = function()
|
||||
require("dapui").setup()
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🐞" })
|
||||
vim.fn.sign_define("DapBreakpointRejected", { text = "🐞" })
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
},
|
||||
},
|
||||
{
|
||||
url = "https://gitlab.com/schrieveslaach/sonarlint.nvim",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
ft = { "python", "go", "js", "ts" },
|
||||
},
|
||||
},
|
||||
}
|
18
nvim/.config/nvim/lua/rust-tools.lua
Normal file
18
nvim/.config/nvim/lua/rust-tools.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||
|
||||
local options = {
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
},
|
||||
dap = {
|
||||
adapter = {
|
||||
type = "executable",
|
||||
command = "lldb-vscode",
|
||||
name = "rt_lldb",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
3
nvim/.config/nvim/spell/en.utf-8.add
Normal file
3
nvim/.config/nvim/spell/en.utf-8.add
Normal file
@@ -0,0 +1,3 @@
|
||||
feat
|
||||
Errored
|
||||
Dreamkiln
|
BIN
nvim/.config/nvim/spell/en.utf-8.add.spl
Normal file
BIN
nvim/.config/nvim/spell/en.utf-8.add.spl
Normal file
Binary file not shown.
@@ -1,2 +1,7 @@
|
||||
Host gitea
|
||||
IdentityFile /home/matt/.ssh/lightsail_rsa
|
||||
User admin
|
||||
Host minecraft
|
||||
IdentityFile /home/matt/.ssh/minecraft_private.pem
|
||||
Host *
|
||||
IdentityFile /home/matt/.ssh/id_ed25519_sk_desk
|
||||
|
@@ -28,11 +28,13 @@ set $term alacritty
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu rofi -show drun
|
||||
set $emoji rofi -modi emoji -show emoji -kb-secondary-copy "" -kb-custom-1 Ctrl+c
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
set $background /home/matt/Photos/wallpaper.png
|
||||
output * bg $background fill
|
||||
output DP-1 bg /home/matt/Photos/Wallpapers/left.jpg fill
|
||||
output DP-3 bg /home/matt/Photos/Wallpapers/right.jpg fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
@@ -85,6 +87,8 @@ input "Logitech G502 HERO Gaming Mouse" {
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
bindsym Mod4+period exec $emoji
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"modules-left": [
|
||||
"sway/workspaces"
|
||||
],
|
||||
"modules-right": ["pulseaudio", "custom/wireguard", "backlight", "network", "cpu", "memory", "disk", "temperature", "battery", "clock", "tray"],
|
||||
"modules-right": ["cava", "pulseaudio", "custom/wireguard", "backlight", "network", "cpu", "memory", "disk", "temperature", "battery", "clock", "tray"],
|
||||
"cpu": {
|
||||
"format": "CPU: {usage}%"
|
||||
},
|
||||
@@ -24,9 +24,34 @@
|
||||
"disk": {
|
||||
"format": "{free}"
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%Y:%m:%d %T}",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/wireguard": {
|
||||
"exec": "~/.config/waybar/scripts/wireguard.sh",
|
||||
"on-click": "~/.config/waybar/scripts/wireguard.sh --toggle",
|
||||
"interval": 2
|
||||
},
|
||||
"cava": {
|
||||
"framerate": 30,
|
||||
"autosens": 1,
|
||||
"sensitivity": 100,
|
||||
"bars": 14,
|
||||
"lower_cutoff_freq": 50,
|
||||
"higher_cutoff_freq": 10000,
|
||||
"method": "pulse",
|
||||
"source": "auto",
|
||||
"stereo": true,
|
||||
"reverse": false,
|
||||
"bar_delimiter": 0,
|
||||
"monstercat": false,
|
||||
"waves": false,
|
||||
"noise_reduction": 0.77,
|
||||
"input_delay": 2,
|
||||
"format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
|
||||
"actions": {
|
||||
"on-click-right": "mode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user