first commit
This commit is contained in:
commit
e6b5aa5900
12 changed files with 254 additions and 0 deletions
12
lua/chadrc.lua
Normal file
12
lua/chadrc.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- 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 :(
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "pastelDark",
|
||||
}
|
||||
|
||||
return M
|
||||
18
lua/configs/conform.lua
Normal file
18
lua/configs/conform.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
javascript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
47
lua/configs/lazy.lua
Normal file
47
lua/configs/lazy.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
defaults = { lazy = true },
|
||||
install = { colorscheme = { "nvchad" } },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = " ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
16
lua/configs/lspconfig.lua
Normal file
16
lua/configs/lspconfig.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
local lspconfig = require "lspconfig"
|
||||
|
||||
-- lsp servers
|
||||
local servers = { "html", "cssls", "clangd", "ts_ls" }
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
-- default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
9
lua/mappings.lua
Normal file
9
lua/mappings.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
require "nvchad.mappings"
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- n then ; to enter : mode
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
|
||||
-- i then j&k to escape
|
||||
map("i", "jk", "<ESC>")
|
||||
6
lua/options.lua
Normal file
6
lua/options.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
require "nvchad.options"
|
||||
|
||||
-- Make tabs 4 spaces
|
||||
local o = vim.o
|
||||
o.shiftwidth = 4
|
||||
o.tabstop = 4
|
||||
44
lua/plugins/init.lua
Normal file
44
lua/plugins/init.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
return {
|
||||
-- config for formatters
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "BufWritePre",
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
-- config for LSP
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
-- treesitter, to have highlighting
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"dart",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Tools for flutter
|
||||
{
|
||||
"akinsho/flutter-tools.nvim",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"stevearc/dressing.nvim",
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue