summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/default-config.lua37
-rw-r--r--lua/settings.lua88
2 files changed, 57 insertions, 68 deletions
diff --git a/lua/default-config.lua b/lua/default-config.lua
index c7932590..03d72dbc 100644
--- a/lua/default-config.lua
+++ b/lua/default-config.lua
@@ -5,35 +5,17 @@ TERMINAL = vim.fn.expand "$TERMINAL"
USER = vim.fn.expand "$USER"
O = {
- format_on_save = true,
- auto_close_tree = 0,
- colorcolumn = "99999", -- fixes indentline for now
+ leader_key = "space",
colorscheme = "spacegray",
- clipboard = "unnamedplus",
- hidden_files = true,
- wrap_lines = false,
- spell = false,
- spelllang = "en",
- number = true,
- relative_number = false,
- number_width = 4,
- shift_width = 2,
- tab_stop = 2,
- cmdheight = 2,
- cursorline = true,
- shell = "bash",
- scrolloff = 0,
- timeoutlen = 100,
- nvim_tree_disable_netrw = 0,
- ignore_case = true,
- smart_case = true,
- lushmode = false,
- hl_search = false,
- document_highlight = true,
transparent_window = false,
- leader_key = "space",
+ format_on_save = true,
vnsip_dir = vim.fn.stdpath "config" .. "/snippets",
+ -- TODO refactor for tree
+ auto_close_tree = 0,
+ nvim_tree_disable_netrw = 0,
+
+ -- TODO refactor treesitter
-- @usage pass a table with your desired languages
treesitter = {
ensure_installed = "all",
@@ -65,15 +47,15 @@ O = {
},
lsp = {
+ document_highlight = true,
popup_border = "single",
},
- database = { save_location = "~/.config/nvcode_db", auto_execute = 1 },
+ database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
plugin = {
-- Builtins
diffview = { active = false },
-
ts_context_commentstring = { active = false },
ts_hintobjects = { active = false },
ts_autotag = { active = false },
@@ -86,6 +68,7 @@ O = {
lush = { active = false },
},
+ -- TODO just using mappings (leader mappings)
user_which_key = {},
user_plugins = {
diff --git a/lua/settings.lua b/lua/settings.lua
index 396df565..6ce4ff91 100644
--- a/lua/settings.lua
+++ b/lua/settings.lua
@@ -17,48 +17,54 @@ end
--- SETTINGS ---
-opt.backup = false -- creates a backup file
-opt.clipboard = O.clipboard -- allows neovim to access the system clipboard
-opt.cmdheight = O.cmdheight -- more space in the neovim command line for displaying messages
-opt.colorcolumn = O.colorcolumn
-opt.completeopt = { "menuone", "noselect" }
-opt.conceallevel = 0 -- so that `` is visible in markdown files
-opt.fileencoding = "utf-8" -- the encoding written to a file
-opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
-opt.hidden = O.hidden_files -- required to keep multiple buffers and open multiple buffers
-opt.hlsearch = O.hl_search -- highlight all matches on previous search pattern
-opt.ignorecase = O.ignore_case -- ignore case in search patterns
-opt.mouse = "a" -- allow the mouse to be used in neovim
-opt.pumheight = 10 -- pop up menu height
-opt.scrolloff = O.scrolloff -- minimal number of screen lines to keep above and below the cursor
-opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
-opt.showtabline = 2 -- always show tabs
-opt.smartcase = O.smart_case -- smart case
-opt.smartindent = true -- make indenting smarter again
-opt.splitbelow = true -- force all horizontal splits to go below current window
-opt.splitright = true -- force all vertical splits to go to the right of current window
-opt.swapfile = false -- creates a swapfile
-opt.termguicolors = true -- set term gui colors (most terminals support this)
-opt.timeoutlen = O.timeoutlen -- time to wait for a mapped sequence to complete (in milliseconds)
-opt.title = true -- set the title of window to the value of the titlestring
--- opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
-opt.undodir = CACHE_PATH .. "/undo" -- set an undo directory
-opt.undofile = true -- enable persisten undo
-opt.updatetime = 300 -- faster completion
-opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
-opt.expandtab = true -- convert tabs to spaces
-opt.shiftwidth = O.shift_width -- the number of spaces inserted for each indentation
opt.shortmess:append "c"
-opt.tabstop = O.tab_stop -- insert 4 spaces for a tab
-opt.cursorline = O.cursorline -- highlight the current line
-opt.number = O.number -- set numbered lines
-opt.relativenumber = O.relative_number -- set relative numbered lines
-opt.numberwidth = O.number_width -- set number column width to 2 {default 4}
-opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
-opt.wrap = O.wrap_lines -- display lines as one long line
-opt.spell = O.spell
-opt.spelllang = O.spelllang
-opt.scrolloff = 8 -- is one of my fav
+O.default_options = {
+ backup = false, -- creates a backup file
+ clipboard = "unnamedplus", -- allows neovim to access the system clipboard
+ cmdheight = 2, -- more space in the neovim command line for displaying messages
+ colorcolumn = "99999", -- fixes indentline for now
+ completeopt = { "menuone", "noselect" },
+ conceallevel = 0, -- so that `` is visible in markdown files
+ fileencoding = "utf-8", -- the encoding written to a file
+ guifont = "monospace:h17", -- the font used in graphical neovim applications
+ hidden = true, -- required to keep multiple buffers and open multiple buffers
+ hlsearch = false, -- highlight all matches on previous search pattern
+ ignorecase = true, -- ignore case in search patterns
+ mouse = "a", -- allow the mouse to be used in neovim
+ pumheight = 10, -- pop up menu height
+ showmode = false, -- we don't need to see things like -- INSERT -- anymore
+ showtabline = 2, -- always show tabs
+ smartcase = true, -- smart case
+ smartindent = true, -- make indenting smarter again
+ splitbelow = true, -- force all horizontal splits to go below current window
+ splitright = true, -- force all vertical splits to go to the right of current window
+ swapfile = false, -- creates a swapfile
+ termguicolors = true, -- set term gui colors (most terminals support this)
+ timeoutlen = 100, -- time to wait for a mapped sequence to complete (in milliseconds)
+ title = true, -- set the title of window to the value of the titlestring
+ -- opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
+ undodir = CACHE_PATH .. "/undo", -- set an undo directory
+ undofile = true, -- enable persisten undo
+ updatetime = 300, -- faster completion
+ writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
+ expandtab = true, -- convert tabs to spaces
+ shiftwidth = 2, -- the number of spaces inserted for each indentation
+ tabstop = 2, -- insert 2 spaces for a tab
+ cursorline = true, -- highlight the current line
+ number = true, -- set numbered lines
+ relativenumber = false, -- set relative numbered lines
+ numberwidth = 4, -- set number column width to 2 {default 4}
+ signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time
+ wrap = false, -- display lines as one long line
+ spell = false,
+ spelllang = "en",
+ scrolloff = 8, -- is one of my fav
+}
+
+for k, v in pairs(O.default_options) do
+ opt[k] = v
+end
+
local disabled_built_ins = {
"netrw",
"netrwPlugin",