Format project, setup conform format on save, remove redundant commented pieces

This commit is contained in:
2025-05-31 20:02:10 +05:00
parent f12cc324f1
commit 90b457b768
8 changed files with 37 additions and 49 deletions

View File

@ -1,24 +1,19 @@
-- This file needs to have same structure as nvconfig.lua
-- 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 :(
-- Please read that file to know all available options :(
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "onedark",
theme = "onedark",
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
hl_override = {
Comment = { italic = true },
["@comment"] = { italic = true },
},
}
-- M.nvdash = { load_on_startup = true }
-- M.ui = {
-- tabufline = {
-- lazyload = false
-- }
--}
M.nvdash = { load_on_startup = true }
return M

View File

@ -1,15 +1,12 @@
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,
-- },
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
}
return options

View File

@ -2,5 +2,3 @@ require("nvchad.configs.lspconfig").defaults()
local servers = { "html", "cssls" }
vim.lsp.enable(servers)
-- read :h vim.lsp.config for changing options of lsp servers

View File

@ -0,0 +1,10 @@
return {
ensure_installed = { "lua", "luadoc", "printf", "vim", "vimdoc" },
highlight = {
enable = true,
use_languagetree = true,
},
indent = { enable = true },
}

View File

@ -1,11 +1,7 @@
require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("n", "<leader>cd", ":cd ..<CR>", { desc = "Go to parent directory" })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")

View File

@ -1,6 +1,6 @@
require "nvchad.options"
-- add yours here!
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
local o = vim.o
o.shiftwidth = 4
o.tabstop = 4
o.softtabstop = 4

View File

@ -1,11 +1,10 @@
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
event = "BufWritePre",
opts = require "configs.conform",
},
-- These are some examples, uncomment them if you want to see them work!
{
"neovim/nvim-lspconfig",
config = function()
@ -18,7 +17,7 @@ return {
"natecraddock/workspaces.nvim",
config = function()
require("workspaces").setup()
end
end,
},
{
@ -27,18 +26,12 @@ return {
local conf = require "nvchad.configs.nvimtree"
conf.renderer.group_empty = true
return conf
end
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
require "configs.treesitter",
},
},
-- test new blink
-- { import = "nvchad.blink.lazyspec" },
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
}