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.
|
||||
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
|
||||
- So you can delete the .git from this repo ( when you clone it locally ) or fork it :)
|
||||
- Modification for personal use
|
||||
|
||||
# Credits
|
||||
|
||||
|
@ -6,19 +6,14 @@
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
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"
|
||||
|
||||
-- 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>")
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
|
Reference in New Issue
Block a user