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,8 +1,7 @@
**This repo is supposed to used as config by NvChad users!** **NvChad modified!**
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. - The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` - Modification for personal use
- So you can delete the .git from this repo ( when you clone it locally ) or fork it :)
# Credits # Credits

View File

@ -6,19 +6,14 @@
local M = {} local M = {}
M.base46 = { M.base46 = {
theme = "onedark", theme = "onedark",
-- hl_override = { hl_override = {
-- Comment = { italic = true }, Comment = { italic = true },
-- ["@comment"] = { italic = true }, ["@comment"] = { italic = true },
-- }, },
} }
-- M.nvdash = { load_on_startup = true } M.nvdash = { load_on_startup = true }
-- M.ui = {
-- tabufline = {
-- lazyload = false
-- }
--}
return M return M

View File

@ -1,15 +1,12 @@
local options = { local options = {
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
}, },
-- format_on_save = { format_on_save = {
-- -- These options will be passed to conform.format() timeout_ms = 500,
-- timeout_ms = 500, lsp_fallback = true,
-- lsp_fallback = true, },
-- },
} }
return options return options

View File

@ -2,5 +2,3 @@ require("nvchad.configs.lspconfig").defaults()
local servers = { "html", "cssls" } local servers = { "html", "cssls" }
vim.lsp.enable(servers) 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" require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>") map("i", "jk", "<ESC>")
map("n", "<leader>cd", ":cd ..<CR>", { desc = "Go to parent directory" }) 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" require "nvchad.options"
-- add yours here! local o = vim.o
o.shiftwidth = 4
-- local o = vim.o o.tabstop = 4
-- o.cursorlineopt ='both' -- to enable cursorline! o.softtabstop = 4

View File

@ -1,11 +1,10 @@
return { return {
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save event = "BufWritePre",
opts = require "configs.conform", opts = require "configs.conform",
}, },
-- These are some examples, uncomment them if you want to see them work!
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = function() config = function()
@ -18,7 +17,7 @@ return {
"natecraddock/workspaces.nvim", "natecraddock/workspaces.nvim",
config = function() config = function()
require("workspaces").setup() require("workspaces").setup()
end end,
}, },
{ {
@ -27,18 +26,12 @@ return {
local conf = require "nvchad.configs.nvimtree" local conf = require "nvchad.configs.nvimtree"
conf.renderer.group_empty = true conf.renderer.group_empty = true
return conf 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"
-- },
-- },
-- },
} }