initial commit
This commit is contained in:
17
lua/chadrc.lua
Normal file
17
lua/chadrc.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
-- 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 = "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,
|
||||
-- },
|
||||
}
|
||||
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
24
lua/configs/lspconfig.lua
Normal file
24
lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = { "html", "cssls" }
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
-- lsps with 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
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.ts_ls.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.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>")
|
||||
122
lua/options.lua
Normal file
122
lua/options.lua
Normal file
@@ -0,0 +1,122 @@
|
||||
-----------------------------------------------------------
|
||||
-- Neovim Options Configuration
|
||||
-----------------------------------------------------------
|
||||
|
||||
-- Load NvChad default options
|
||||
require("nvchad.options")
|
||||
|
||||
-----------------------------------------------------------
|
||||
-- Global Variables
|
||||
-----------------------------------------------------------
|
||||
|
||||
--[[
|
||||
Global configuration variables for various plugins and features:
|
||||
- dap_virtual_text: Debug Adapter Protocol virtual text
|
||||
- bookmark_sign: Visual indicator for bookmarks
|
||||
- skip_ts_context_commentstring_module: Treesitter comment handling
|
||||
- tabufline_visible: Tab line visibility control
|
||||
--]]
|
||||
local g = {
|
||||
dap_virtual_text = true, -- Enable virtual text for debugging
|
||||
bookmark_sign = "", -- Custom bookmark indicator
|
||||
skip_ts_context_commentstring_module = true,
|
||||
tabufline_visible = true, -- Show tab line
|
||||
}
|
||||
|
||||
-----------------------------------------------------------
|
||||
-- Editor Options
|
||||
-----------------------------------------------------------
|
||||
|
||||
--[[
|
||||
Core editor settings organized by functionality:
|
||||
1. Text Encoding & Clipboard
|
||||
2. Code Folding & Structure
|
||||
3. File Management
|
||||
4. Visual Display
|
||||
5. Text Formatting
|
||||
6. Editor Behavior
|
||||
7. Search & Navigation
|
||||
8. Path & Keyword Configuration
|
||||
--]]
|
||||
local opt = {
|
||||
-------------------
|
||||
-- Text Encoding & Clipboard
|
||||
-------------------
|
||||
encoding = "utf-8", -- Internal encoding
|
||||
fileencoding = "utf-8", -- File encoding
|
||||
clipboard = "unnamedplus", -- System clipboard integration (WSL-aware)
|
||||
|
||||
-------------------
|
||||
-- Code Folding & Structure
|
||||
-------------------
|
||||
foldmethod = "expr", -- Use expression for folding
|
||||
foldexpr = "v:lua.vim.treesitter.foldexpr()",
|
||||
foldcolumn = "0", -- Hide fold column
|
||||
foldtext = "", -- No custom fold text
|
||||
foldlevel = 99, -- High initial fold level
|
||||
foldlevelstart = 5, -- Start with some folds closed
|
||||
foldnestmax = 5, -- Maximum fold nesting
|
||||
|
||||
-------------------
|
||||
-- Visual Display
|
||||
-------------------
|
||||
scrolloff = 10, -- Lines of context
|
||||
termguicolors = true, -- True color support
|
||||
emoji = false, -- Disable emoji support
|
||||
relativenumber = true, -- Relative line numbers
|
||||
cursorline = true, -- Highlight current line
|
||||
cursorlineopt = "both", -- Highlight line number and text
|
||||
|
||||
-------------------
|
||||
-- Text Formatting
|
||||
-------------------
|
||||
wrap = true, -- Enable line wrapping
|
||||
linebreak = true, -- Break at word boundaries
|
||||
textwidth = 0, -- Disable auto text width
|
||||
wrapmargin = 0, -- No margin for wrapping
|
||||
tabstop = 4, -- 2 spaces per tab
|
||||
shiftwidth = 0, -- Match tabstop
|
||||
expandtab = true, -- Use spaces for tabs
|
||||
autoindent = true, -- Maintain indent level
|
||||
|
||||
-------------------
|
||||
-- Editor Behavior
|
||||
-------------------
|
||||
updatetime = 100, -- Faster updates
|
||||
lazyredraw = false, -- Don't defer screen updates
|
||||
inccommand = "split", -- Live substitution preview
|
||||
|
||||
-------------------
|
||||
-- Search & Navigation
|
||||
-------------------
|
||||
ignorecase = true, -- Case-insensitive search
|
||||
|
||||
-------------------
|
||||
-- Path & Keyword Configuration
|
||||
-------------------
|
||||
iskeyword = vim.opt.iskeyword:append({
|
||||
"_", -- Treat underscore as word char
|
||||
"@", -- Include @ in keywords
|
||||
"-", -- Include dash in keywords
|
||||
}),
|
||||
path = vim.opt.path:append({
|
||||
"**", -- Recursive search
|
||||
"lua", -- Lua directory
|
||||
"src", -- Source directory
|
||||
}),
|
||||
shada = "'1000,f1,<500", -- Increase shada size for better buffer retention
|
||||
}
|
||||
|
||||
-----------------------------------------------------------
|
||||
-- Apply Settings
|
||||
-----------------------------------------------------------
|
||||
|
||||
-- Apply global variables
|
||||
for k, v in pairs(g) do
|
||||
vim.g[k] = v
|
||||
end
|
||||
|
||||
-- Apply editor options
|
||||
for k, v in pairs(opt) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
56
lua/plugins/init.lua
Normal file
56
lua/plugins/init.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
{
|
||||
"charludo/projectmgr.nvim",
|
||||
lazy = false, -- Required for proper functionality
|
||||
},
|
||||
|
||||
-- These are some examples, uncomment them if you want to see them work!
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
-- Supermaven
|
||||
{
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("supermaven-nvim").setup {
|
||||
keymaps = {
|
||||
accept_suggestion = "<A-l>",
|
||||
clear_suggestion = "<C-]>",
|
||||
accept_word = "<C-j>",
|
||||
},
|
||||
ignore_filetypes = { cpp = true }, -- or { "cpp", }
|
||||
color = {
|
||||
suggestion_color = "#ffffff",
|
||||
cterm = 244,
|
||||
},
|
||||
log_level = "info", -- set to "off" to disable logging completely
|
||||
disable_inline_completion = false, -- disables inline completion for use with cmp
|
||||
disable_keymaps = false, -- disables built in keymaps for more manual control
|
||||
condition = function()
|
||||
return false
|
||||
end, -- condition to check for stopping supermaven, `true` means to stop supermaven when the condition is true.
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "vim", "lua", "vimdoc",
|
||||
-- "html", "css"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
Reference in New Issue
Block a user