diff --git a/README.md b/README.md index dc0deaa..c5d5235 100644 --- a/README.md +++ b/README.md @@ -1,9 +1 @@ -**This repo is supposed to used as config by NvChad users!** - -- 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 :) - -# Credits - -1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! +Lazy vim / LSP Config / Fuck nvim diff --git a/init.lua b/init.lua index 0fda20c..956531d 100644 --- a/init.lua +++ b/init.lua @@ -32,6 +32,7 @@ dofile(vim.g.base46_cache .. "statusline") require "options" require "nvchad.autocmds" + vim.schedule(function() require "mappings" end) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 29b83c6..438db1e 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -6,8 +6,8 @@ local M = {} M.base46 = { - theme = "onedark", - + theme = "gruvchad", + -- transparency = true, -- hl_override = { -- Comment = { italic = true }, -- ["@comment"] = { italic = true }, @@ -21,4 +21,34 @@ M.base46 = { -- } --} + +M.nvdash = { + load_on_startup = true, + + header = { +"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⠀⠀⠀⠀", +"⠀⠀⠀⢸⠛⠒⠒⠀⠤⢤⣤⡔⠚⠉⠀⢸⠀⠀⠀⠀", +"⠀⠀⠀⢸⡄⢀⠴⣊⠉⠀⢀⡈⠉⠙⠒⠾⣙⡦⠄⠀", +"⠀⠠⠴⡁⡽⣡⠊⠁⠀⠀⢰⠳⡌⣦⡀⠀⠈⢳⣄⠀", +"⠀⠀⠀⢸⢱⠃⠀⠀⢀⡴⠃⠀⡿⠃⠙⢦⡀⠘⣏⠁", +"⠀⠀⠀⡆⢸⡄⢠⣾⠉⠙⡆⠀⠀⠀⣼⡏⠙⣦⣸⠀", +"⠀⠀⢰⠇⠈⢷⢾⠄⠀⠤⠅⠀⠀⠀⠦⠤⠤⣇⡿⠀", +"⠀⠀⣼⡆⠀⠀⢸⠀⠀⢀⡄⠒⠒⠒⡆⠀⣠⢞⣡⠀", +"⠀⠙⣅⣣⣀⣀⣸⣦⣄⣈⣇⣀⣀⣤⠗⢻⣅⡜⠻⠆", +"⠀⠘⠧⠤⠤⠽⣀⣀⡿⢿⣟⣿⣉⣉⠭⠭⠤⠼⠃⠀", +"⠀⠀⠀⠀⠀⢄⡀⢠⠇⠀⠉⠘⡇⠁⣀⠄⠠⠄⡀⠀", +"⠉⠒⠤⣀⠀⠀⡈⣽⠀⠀⠀⠀⢸⡍⣀⠀⠀⡀⠀⠂", +"⠀⠀⠀⠀⠀⠀⢀⡿⠀⠀⠀⠀⠀⢳⢀⠈⠀⠀⠀⠀", +"⠀⠀⡠⠂⠀⠀⣰⢧⠌⢄⠖⡔⠡⡞⣧⠀⠈⠑⢄⠀", +"⠠⠊⠀⠀⠀⠊⠈⠻⡿⠛⠛⠛⠻⠽⠀⠃⠀⠀⠈⠣", + }, + + buttons = { + { txt = " Find File", keys = "Spc f f", cmd = "Telescope find_files" }, + { txt = " Recent Files", keys = "Spc f o", cmd = "Telescope oldfiles" }, + -- more... check nvconfig.lua file for full list of buttons + }, + } + + return M diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index 478df01..3894fcc 100644 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -4,7 +4,7 @@ require("nvchad.configs.lspconfig").defaults() local lspconfig = require "lspconfig" -- EXAMPLE -local servers = { "html", "cssls" } +local servers = { "html", "cssls","rust_analyzer" } local nvlsp = require "nvchad.configs.lspconfig" -- lsps with default config diff --git a/lua/mappings.lua b/lua/mappings.lua index 783b78f..14718f9 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -7,4 +7,10 @@ local map = vim.keymap.set map("n", ";", ":", { desc = "CMD enter command mode" }) map("i", "jk", "") +map("n","", "bnext", { desc = "Next buffer" }) +map("n","", "bprevious",{ desc = "Previous buffer" }) +map('n',"gra", function() vim.lsp.buf.code_action() end, {desc = "vim.lsp.buf.code_action()" }) +map("x","gra", function() vim.lsp.buf.code_action() end, { desc = "vim.lsp.buf.code_action()" }) +map("n","grn", function() vim.lsp.buf.rename() end ,{desc = "vim.lsp.buf.rename()" }) +map("n","grr", function() vim.lsp.buf.references() end ,{ desc = "vim.lsp.buf.references()" }) -- map({ "n", "i", "v" }, "", " w ")