Initial commit based on NvChad v2.0

This commit is contained in:
Daniele Viganò 2024-03-02 01:01:31 +01:00
commit 465ae1422c
Signed by: dani
GPG Key ID: DB49AFC03C40EE02
5 changed files with 129 additions and 0 deletions

9
chadrc.lua Normal file
View File

@ -0,0 +1,9 @@
---@type ChadrcConfig
local M = {}
M.ui = { theme = 'nightowl' }
M.plugins = "custom.plugins"
M.mappings = require "custom.mappings"
return M

13
configs/lspconfig.lua Normal file
View File

@ -0,0 +1,13 @@
local lspconfig = require("lspconfig")
lspconfig.pylsp.setup{
settings = {
pylsp = {
plugins = {
pycodestyle = {
maxLineLength = 79
}
}
}
}
}

19
init.lua Normal file
View File

@ -0,0 +1,19 @@
local autocmd = vim.api.nvim_create_autocmd
vim.opt.fillchars = { }
--
-- restore shift-y line copy
vim.keymap.set('n', 'Y', 'Y')
--
-- enable nvim intro
-- vim.opt.shortmess = "filnxtToO"
vim.opt.whichwrap:remove "<>[]hl"
--
-- python max columns
autocmd("FileType", {
pattern = "python",
callback = function()
vim.opt.textwidth = 79
vim.opt.colorcolumn = "80"
end,
})

21
mappings.lua Normal file
View File

@ -0,0 +1,21 @@
local M = {}
M.dap = {
plugin = true,
n = {
["<leader>db"] = {"<cmd> DapToggleBreakpoint <CR>"}
}
}
M.dap_python = {
plugin = true,
n = {
["<leader>dpr"] = {
function()
require('dap-python').test_method()
end
}
}
}
return M

67
plugins.lua Normal file
View File

@ -0,0 +1,67 @@
local plugins = {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"python-lsp-server",
"debugpy",
},
},
},
{
"Bekaboo/deadcolumn.nvim",
},
{
"neovim/nvim-lspconfig",
config = function ()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end
},
{
"stevearc/vim-arduino",
ft = {"arduino"},
},
{
"rcarriga/nvim-dap-ui",
dependencies = "mfussenegger/nvim-dap",
config = function()
local dap = require("dap")
local dapui = require("dapui")
dapui.setup()
dap.listeners.after.event_initialized["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
},
{
"mfussenegger/nvim-dap",
config = function(_, opts)
require("core.utils").load_mappings("dap")
end
},
{
"mfussenegger/nvim-dap-python",
ft = "python",
dependencies = {
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui",
},
config = function(_, opts)
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
require("dap-python").setup(path)
require("core.utils").load_mappings("dap_python")
end,
},
{
"tpope/vim-fugitive",
lazy = false,
},
}
return plugins