mirror of
https://github.com/eRgo35/neovim.git
synced 2026-02-04 05:46:10 +01:00
feat: bumped configs
This commit is contained in:
36
lua-old/chadrc.lua
Normal file
36
lua-old/chadrc.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.ui = {
|
||||
theme = "gruvbox",
|
||||
theme_toggle = { "gruvbox", "everforest_light" },
|
||||
|
||||
nvdash = {
|
||||
load_on_startup = true,
|
||||
}
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
M.nvimtree = {
|
||||
git = {
|
||||
enable = true,
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
show = {
|
||||
git = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
15
lua-old/configs/conform.lua
Normal file
15
lua-old/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-old/configs/lazy.lua
Normal file
47
lua-old/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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
47
lua-old/configs/lspconfig.lua
Normal file
47
lua-old/configs/lspconfig.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
-- EXAMPLE
|
||||
local on_attach = require("nvchad.configs.lspconfig").on_attach
|
||||
local on_init = require("nvchad.configs.lspconfig").on_init
|
||||
local capabilities = require("nvchad.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local servers = { "html", "cssls", "tsserver", "clangd" }
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
lspconfig.svelte.setup {}
|
||||
|
||||
lspconfig.clangd.setup {
|
||||
on_attach = function (client, bufnr)
|
||||
client.server_capabilities.signatureHelpProvider = false
|
||||
on_attach(client, bufnr)
|
||||
end,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
lspconfig.rust_analyzer.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = {"rust"},
|
||||
-- root_dir = util.root_pattern("Cargo.toml"),
|
||||
settings = {
|
||||
['rust_analyzer'] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- typescript
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
25
lua-old/configs/null-ls.lua
Normal file
25
lua-old/configs/null-ls.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
local opts = {
|
||||
sources = {
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
},
|
||||
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
|
||||
15
lua-old/mappings.lua
Normal file
15
lua-old/mappings.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
require "nvchad.mappings"
|
||||
|
||||
-- add yours here
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jk", "<ESC>")
|
||||
|
||||
map("n", "<C-h>", "<cmd>TmuxNavigateLeft<CR>", { desc = "window left" })
|
||||
map("n", "<C-l>", "<cmd>TmuxNavigateRight<CR>", { desc = "window up" })
|
||||
map("n", "<C-j>", "<cmd>TmuxNavigateDown<CR>", { desc = "window up" })
|
||||
map("n", "<C-k>", "<cmd>TmuxNavigateUp<CR>", { desc = "window up" })
|
||||
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
6
lua-old/options.lua
Normal file
6
lua-old/options.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
164
lua-old/plugins/init.lua
Normal file
164
lua-old/plugins/init.lua
Normal file
@@ -0,0 +1,164 @@
|
||||
return {
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
config = function()
|
||||
require "configs.conform"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- lua
|
||||
"lua-language-server",
|
||||
"stylua",
|
||||
|
||||
-- web dev
|
||||
"html-lsp",
|
||||
"css-lsp",
|
||||
"prettier",
|
||||
"typescript-language-server",
|
||||
"deno",
|
||||
|
||||
-- rusty rust
|
||||
"rust-analyzer",
|
||||
|
||||
-- c/c++
|
||||
"clangd",
|
||||
"clang-format",
|
||||
"codelldb",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"c",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{ "nvim-neotest/nvim-nio" },
|
||||
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
event = "VeryLazy",
|
||||
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.after.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.after.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
opts = {
|
||||
handlers = {}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function(_, _)
|
||||
-- require("core.utils").load_mappings("dap")
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"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,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
-- opts = function()
|
||||
-- local M = require "plugins.configs.cmp"
|
||||
-- table.insert(M.sources, {name = "crates"})
|
||||
-- return M
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
{
|
||||
"nanotee/zoxide.vim",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"othree/html5.vim",
|
||||
},
|
||||
|
||||
{
|
||||
"pangloss/vim-javascript",
|
||||
},
|
||||
|
||||
{
|
||||
"evanleck/vim-svelte",
|
||||
},
|
||||
|
||||
{
|
||||
"max397574/better-escape.nvim",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("better_escape").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user