Format project, setup conform format on save, remove redundant commented pieces
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
@ -8,17 +8,12 @@ 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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
|
||||||
|
10
lua/configs/treesitter.lua
Normal file
10
lua/configs/treesitter.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
ensure_installed = { "lua", "luadoc", "printf", "vim", "vimdoc" },
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
use_languagetree = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
indent = { enable = true },
|
||||||
|
}
|
@ -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>")
|
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user