add nvchad_types & .stylua.toml
This commit is contained in:
parent
9d47133ba1
commit
726248c2f3
6 changed files with 75 additions and 9 deletions
6
.stylua.toml
Normal file
6
.stylua.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "None"
|
|
@ -1,7 +1,13 @@
|
|||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.ui = {
|
||||
theme = "onedark",
|
||||
theme = "onedark",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
local options = {
|
||||
lsp_fallback = true,
|
||||
|
||||
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,
|
||||
-- },
|
||||
}
|
||||
|
||||
require("conform").setup(options)
|
||||
|
|
23
lua/configs/lspconfig.lua
Normal file
23
lua/configs/lspconfig.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
-- EXAMPLE
|
||||
local on_attach = require("nvchad.configs.lspconfig").on_attach
|
||||
local on_init = require("nvchad.configs.lspconfig").on_init
|
||||
local capabilities = require("nvchad.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local servers = { "html", "cssls" }
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- typescript
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
|
|
|
@ -1,15 +1,37 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre' -- uncomment for format on save
|
||||
config = function()
|
||||
require "configs.conform"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
opts = {
|
||||
git = { enable = true },
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "neovim/nvim-lspconfig",
|
||||
-- config = function()
|
||||
-- require("nvchad.configs.lspconfig").defaults()
|
||||
-- require "configs.lspconfig"
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- {
|
||||
-- "williamboman/mason.nvim",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "lua-language-server", "stylua",
|
||||
-- "html-lsp", "css-lsp" , "prettier"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
--
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "vim", "lua", "vimdoc
|
||||
-- "html", "css"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue