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:
@@ -1,16 +1,12 @@
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua
|
||||
-- Please read that file to know all available options :(
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.ui = {
|
||||
M.base46 = {
|
||||
theme = "gruvbox",
|
||||
theme_toggle = { "gruvbox", "everforest_light" },
|
||||
|
||||
nvdash = {
|
||||
load_on_startup = true,
|
||||
}
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
@@ -18,19 +14,4 @@ M.ui = {
|
||||
-- },
|
||||
}
|
||||
|
||||
M.nvimtree = {
|
||||
git = {
|
||||
enable = true,
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
show = {
|
||||
git = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
|
||||
@@ -12,4 +12,4 @@ local options = {
|
||||
-- },
|
||||
}
|
||||
|
||||
require("conform").setup(options)
|
||||
return options
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
-- 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
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local servers = { "html", "cssls", "tsserver", "clangd" }
|
||||
|
||||
-- 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 = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -39,9 +40,9 @@ lspconfig.rust_analyzer.setup({
|
||||
},
|
||||
})
|
||||
|
||||
-- typescript
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
-- configuring single server, example: typescript
|
||||
lspconfig.ts_ls.setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
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
|
||||
@@ -6,110 +6,36 @@ return {
|
||||
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
config = function()
|
||||
require "configs.conform"
|
||||
end,
|
||||
event = 'BufWritePre', -- uncomment for format on save
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
-- 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
|
||||
"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 = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"c",
|
||||
"markdown",
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
handlers = {}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function(_, _)
|
||||
-- require("core.utils").load_mappings("dap")
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
{
|
||||
"rust-lang/rust.vim",
|
||||
ft = "rust",
|
||||
init = function ()
|
||||
@@ -127,16 +53,7 @@ return {
|
||||
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,
|
||||
},
|
||||
@@ -160,5 +77,4 @@ return {
|
||||
require("better_escape").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user