mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 05:20:38 +00:00
better config structure
This commit is contained in:
parent
03e78be718
commit
503dc5b1c8
15 changed files with 20 additions and 22 deletions
10
README.md
10
README.md
|
@ -79,15 +79,13 @@ nvim-base16 doesnt even take time to load unlike base16-vim which was eating hal
|
||||||
nvim
|
nvim
|
||||||
├──init.lua
|
├──init.lua
|
||||||
└──lua
|
└──lua
|
||||||
└──foo
|
└──anything.lua
|
||||||
└──lua.lua
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- The init.lua is used instead of init.vim.
|
- The init.lua is used instead of init.vim.
|
||||||
|
- The lua folder contains modules ( config files ) , in the example above anything.lua file in lua folder could be considered as a module.
|
||||||
- The lua folder contains modules ( config files ) , in the example above "foo" folder could be considered as a module and it contains a lua.lua.
|
- The anything.lua file is supposed to have any neovim config written in lua , its like splitting the overall config into small bits and make it more organized , like one module for highlights and colors , another one for statusline and so on!.
|
||||||
- The lua.lua file is supposed to have any nvim config written in lua , its like splitting the overall config into small bits and make it more organized.
|
- To load or source that "anything" module (like making it load with init.lua ) ,add this is in init.lua : require "anything".
|
||||||
- To load or source that "foo" module (like making it load with init.lua ) , you need to load it in init.lua like this : require('foo.lua').
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
|
|
26
init.lua
26
init.lua
|
@ -1,17 +1,17 @@
|
||||||
-- load all plugins
|
-- load all plugins
|
||||||
require "pluginsList.lua"
|
require "pluginList"
|
||||||
require "file-icons.lua"
|
require "file-icons"
|
||||||
|
|
||||||
require "misc-utils.lua"
|
require "misc-utils"
|
||||||
require "bufferline.lua"
|
require "top-bufferline"
|
||||||
require "statusline.lua"
|
require "statusline"
|
||||||
|
|
||||||
require("colorizer").setup()
|
require("colorizer").setup()
|
||||||
require("neoscroll").setup() -- smooth scroll
|
require("neoscroll").setup() -- smooth scroll
|
||||||
|
|
||||||
-- lsp
|
-- lsp
|
||||||
require "lspconfig.lua"
|
require "nvim-lspconfig"
|
||||||
require "compe.lua"
|
require "compe-completion"
|
||||||
|
|
||||||
local cmd = vim.cmd
|
local cmd = vim.cmd
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
|
@ -42,8 +42,8 @@ g.indent_blankline_buftype_exclude = {"terminal"}
|
||||||
g.indent_blankline_show_trailing_blankline_indent = false
|
g.indent_blankline_show_trailing_blankline_indent = false
|
||||||
g.indent_blankline_show_first_indent_level = false
|
g.indent_blankline_show_first_indent_level = false
|
||||||
|
|
||||||
require "treesitter.lua"
|
require "treesitter-nvim"
|
||||||
require "mappings.lua"
|
require "mappings"
|
||||||
|
|
||||||
-- highlights --
|
-- highlights --
|
||||||
cmd "hi LineNr guifg=#42464e guibg=NONE"
|
cmd "hi LineNr guifg=#42464e guibg=NONE"
|
||||||
|
@ -58,11 +58,11 @@ cmd "hi Pmenu guibg=#282c34"
|
||||||
cmd "hi Normal guibg=NONE ctermbg=NONE"
|
cmd "hi Normal guibg=NONE ctermbg=NONE"
|
||||||
-- cmd "hi Normal guibg=#1e222a"
|
-- cmd "hi Normal guibg=#1e222a"
|
||||||
|
|
||||||
require "telescope.lua"
|
require "telescope-nvim"
|
||||||
require "nvimTree.lua"
|
require "nvimTree"
|
||||||
|
|
||||||
-- git signs , lsp symbols etc
|
-- git signs , lsp symbols etc
|
||||||
require "gitsigns.lua"
|
require "gitsigns-nvim"
|
||||||
require("nvim-autopairs").setup()
|
require("nvim-autopairs").setup()
|
||||||
require("lspkind").init()
|
require("lspkind").init()
|
||||||
|
|
||||||
|
@ -78,4 +78,4 @@ cmd "hi clear CursorLine"
|
||||||
cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf"
|
cmd "hi cursorlinenr guibg=NONE guifg=#abb2bf"
|
||||||
|
|
||||||
-- setup for TrueZen.nvim
|
-- setup for TrueZen.nvim
|
||||||
require "zenmode.lua"
|
require "zenmode"
|
||||||
|
|
Loading…
Reference in a new issue