mirror of
https://github.com/gabehf/nvim-conf.git
synced 2026-03-09 07:28:38 -07:00
update
This commit is contained in:
commit
6eb999b94f
11 changed files with 920 additions and 0 deletions
16
lua/chadrc.lua
Normal file
16
lua/chadrc.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
|
||||
M.ui = {
|
||||
theme = "onedark",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
return M
|
||||
15
lua/configs/conform.lua
Normal file
15
lua/configs/conform.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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,
|
||||
-- },
|
||||
}
|
||||
|
||||
require("conform").setup(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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
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,
|
||||
}
|
||||
10
lua/mappings.lua
Normal file
10
lua/mappings.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
require "nvchad.mappings"
|
||||
|
||||
-- add yours here
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jk", "<ESC>")
|
||||
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
51
lua/options.lua
Normal file
51
lua/options.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
vim.opt.mouse=''
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
||||
once = true,
|
||||
callback = function()
|
||||
if vim.fn.has("win32") == 1 or vim.fn.has("wsl") == 1 then
|
||||
vim.g.clipboard = {
|
||||
copy = {
|
||||
["+"] = "win32yank.exe -i --crlf",
|
||||
["*"] = "win32yank.exe -i --crlf",
|
||||
},
|
||||
paste = {
|
||||
["+"] = "win32yank.exe -o --lf",
|
||||
["*"] = "win32yank.exe -o --lf",
|
||||
},
|
||||
}
|
||||
elseif vim.fn.has("unix") == 1 then
|
||||
if vim.fn.executable("xclip") == 1 then
|
||||
vim.g.clipboard = {
|
||||
copy = {
|
||||
["+"] = "xclip -selection clipboard",
|
||||
["*"] = "xclip -selection clipboard",
|
||||
},
|
||||
paste = {
|
||||
["+"] = "xclip -selection clipboard -o",
|
||||
["*"] = "xclip -selection clipboard -o",
|
||||
},
|
||||
}
|
||||
elseif vim.fn.executable("xsel") == 1 then
|
||||
vim.g.clipboard = {
|
||||
copy = {
|
||||
["+"] = "xsel --clipboard --input",
|
||||
["*"] = "xsel --clipboard --input",
|
||||
},
|
||||
paste = {
|
||||
["+"] = "xsel --clipboard --output",
|
||||
["*"] = "xsel --clipboard --output",
|
||||
},
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
end,
|
||||
desc = "Lazy load clipboard",
|
||||
})
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
38
lua/plugins/init.lua
Normal file
38
lua/plugins/init.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
config = function()
|
||||
require "configs.conform"
|
||||
end,
|
||||
},
|
||||
|
||||
-- These are some examples, uncomment them if you want to see them work!
|
||||
-- {
|
||||
-- "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…
Add table
Add a link
Reference in a new issue