From bcdd436adc7abfba10c670e49ac64cbf413c0105 Mon Sep 17 00:00:00 2001 From: Gerrit Pannek Date: Thu, 22 Dec 2022 11:18:05 +0100 Subject: [PATCH] fix(nvchad) --- configfile/nvim/lua/custom/chadrc.lua | 59 +++++++-------------- configfile/nvim/lua/custom/init.lua | 1 - configfile/nvim/lua/custom/plugins/init.lua | 43 ++++++++++----- 3 files changed, 47 insertions(+), 56 deletions(-) diff --git a/configfile/nvim/lua/custom/chadrc.lua b/configfile/nvim/lua/custom/chadrc.lua index 1fffb94..b3ef736 100644 --- a/configfile/nvim/lua/custom/chadrc.lua +++ b/configfile/nvim/lua/custom/chadrc.lua @@ -1,51 +1,28 @@ --- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater --- This file is for NvChad options & tools, custom settings are split between here and 'lua/custom/init.lua' +-- ChadRC.lua local M = {} -local userPlugins = require "custom.plugins" -M.options = { --- relativenumber = true, - smarttab = true -} +-- M.options = { +-- relativenumber = true, +-- smarttab = true +-- } M.ui = { - theme = "tokyonight" + theme = "tokyonight" } --- NvChad included plugin options & overrides -M.plugins = { - options = { - statusline = { - separator_style = "slant", - } - -- lspconfig = { - -- path of file containing setups of different lsps (ex : "custom.plugins.lspconfig"), read the docs for more info - -- setup_lspconf = "", - -- }, - }, - -- To change the Packer `config` of a plugin that comes with NvChad, - -- add a table entry below matching the plugin github name - -- '-' -> '_', remove any '.lua', '.nvim' extensions - -- this string will be called in a `require` - -- use "(custom.configs).my_func()" to call a function - -- use "custom.blankline" to call a file - --default_plugin_config_replace = {}, - override = {}, - remove = {}, +M.plugins = require "custom.plugins" - user = userPlugins, -} - -M.mappings = { - -- custom = {}, -- custom user mappings - - custom = { - cheatsheet = "ch", - line_number_toggle = "n", -- toggle line number - update_nvchad = "uu", - new_tab = "t", - }, -} +-- M.mappings = { +-- -- custom = {}, -- custom user mappings +-- +-- custom = { +-- cheatsheet = "ch", +-- line_number_toggle = "n", -- toggle line number +-- update_nvchad = "uu", +-- new_tab = "t", +-- }, +-- } return M + diff --git a/configfile/nvim/lua/custom/init.lua b/configfile/nvim/lua/custom/init.lua index c2c7090..0ac1642 100644 --- a/configfile/nvim/lua/custom/init.lua +++ b/configfile/nvim/lua/custom/init.lua @@ -12,4 +12,3 @@ vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] -- File extension specific tabbing vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]] - diff --git a/configfile/nvim/lua/custom/plugins/init.lua b/configfile/nvim/lua/custom/plugins/init.lua index 9df92c9..fa60b04 100644 --- a/configfile/nvim/lua/custom/plugins/init.lua +++ b/configfile/nvim/lua/custom/plugins/init.lua @@ -2,20 +2,35 @@ -- return { ['cappyzawa/trim.nvim'] = { - config = function() - require('trim').setup({ - -- if you want to ignore markdown file. - -- you can specify filetypes. - disable = {"markdown"}, + override_options = { + config = function() + require('trim').setup({ + -- if you want to ignore markdown file. + -- you can specify filetypes. + disable = {"markdown"}, - -- if you want to ignore space of top - patterns = { - [[%s/\s\+$//e]], -- remove unwanted spaces - [[%s/\($\n\s*\)\+\%$//]], -- trim last line - [[%s/\%^\n\+//]], -- trim first line - -- [[%s/\(\n\n\)\n\+/\1/]], -- replace multiple blank lines with a single line - }, - }) - end + -- if you want to ignore space of top + patterns = { + [[%s/\s\+$//e]], -- remove unwanted spaces + [[%s/\($\n\s*\)\+\%$//]], -- trim last line + [[%s/\%^\n\+//]], -- trim first line + -- [[%s/\(\n\n\)\n\+/\1/]], -- replace multiple blank lines with a single line + }, + }) + end + } + }, + + -- disable dashboard + ['goolord/alpha-nvim'] = { disable = true }, + + -- UI + ["NvChad/ui"] = { + override_options = { + statusline = { + separator_style = "arrow", -- default/round/block/arrow + overriden_modules = nil, + }, + } } }