Migrate to NvChad v2.5
This commit is contained in:
9
lua/chadrc.lua
Normal file
9
lua/chadrc.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.ui = { theme = 'nightowl' }
|
||||
-- M.plugins = "plugins"
|
||||
-- M.mappings = require "mappings"
|
||||
|
||||
|
||||
return M
|
15
lua/configs/conform.lua
Normal file
15
lua/configs/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
},
|
||||
|
||||
-- format_on_save = {
|
||||
-- -- These options will be passed to conform.format()
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_fallback = true,
|
||||
-- },
|
||||
}
|
||||
|
||||
require("conform").setup(options)
|
47
lua/configs/lazy.lua
Normal file
47
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
13
lua/configs/lspconfig.lua
Normal file
13
lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
lspconfig.pylsp.setup{
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
maxLineLength = 79
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
lua/mappings.lua
Normal file
22
lua/mappings.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
require "nvchad.mappings"
|
||||
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
|
19
lua/myinit.lua
Normal file
19
lua/myinit.lua
Normal 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,
|
||||
})
|
6
lua/options.lua
Normal file
6
lua/options.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
64
lua/plugins/init.lua
Normal file
64
lua/plugins/init.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
config = function()
|
||||
require "configs.conform"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"python-lsp-server",
|
||||
"debugpy",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"Bekaboo/deadcolumn.nvim",
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function ()
|
||||
require "nvchad.configs.lspconfig"
|
||||
require "configs.lspconfig"
|
||||
end
|
||||
},
|
||||
{
|
||||
"stevearc/vim-arduino",
|
||||
ft = {"arduino"},
|
||||
},
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
lazy = false,
|
||||
},
|
||||
-- These are some examples, uncomment them if you want to see them work!
|
||||
-- {
|
||||
-- "neovim/nvim-lspconfig",
|
||||
-- config = function()
|
||||
-- require("nvchad.configs.lspconfig").defaults()
|
||||
-- require "configs.lspconfig"
|
||||
-- end,
|
||||
-- },
|
||||
--
|
||||
-- {
|
||||
-- "williamboman/mason.nvim",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "lua-language-server", "stylua",
|
||||
-- "html-lsp", "css-lsp" , "prettier"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
--
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "vim", "lua", "vimdoc",
|
||||
-- "html", "css"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
Reference in New Issue
Block a user