diff options
Diffstat (limited to 'lua/core/opts.lua')
-rw-r--r-- | lua/core/opts.lua | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/lua/core/opts.lua b/lua/core/opts.lua new file mode 100644 index 0000000..5f491e1 --- /dev/null +++ b/lua/core/opts.lua @@ -0,0 +1,167 @@ +o = vim.opt +g = vim.g +a = vim.api +cmd = vim.cmd + +g.mapleader = " " + +--------------- +-- better ui -- +--------------- +o.number = true +o.relativenumber = true +o.numberwidth = 2 -- width o numberline +o.signcolumn = 'yes:1' -- show gutter +o.cursorline = true -- highlights the current line +o.scrolloff = 5 -- # lines below/above cursor +o.showmode = false -- stop vim from showing mode +o.cmdheight = 2 -- vim command height +o.mouse = "" -- no mouse + +o.wrap = true -- wrap lines +o.linebreak = true -- fix where line is wraped +o.emoji = false -- something to do with the spacing of emojis +o.clipboard = 'unnamedplus' -- use system clipboard + +-- intenting & tabing +o.expandtab = true +o.smarttab = true +o.cindent = true +o.autoindent = true +o.tabstop = 2 +o.shiftwidth = 2 +o.softtabstop = -1 -- If negative, shiftwidth value is used + +-- colors +o.termguicolors = true +cmd('colorscheme jellybeans-nvim') + +-- diagnostics +vim.diagnostic.config({ + underline = true, + virtual_text = { prefix = '*', }, +}) + +colors = { + black = '#000000', + black2 = '#161616', + black3 = '#0E0E0E', + black4 = '#101010', + grey = '#1E1E1E', + grey2 = '#404040', + white = '#ffffff', + red = '#E06C75', + orange = '#EA936C', + yellow = '#E5C07B', + green = '#98C379', + blue = '#61AFEF', + purple = '#C678DD', +} + +-- width line +o.colorcolumn = { 80 } + +-- custom opts +copts = { + tablines = 'colored', -- false, 'colored', and 'wrap' + minimapcolor = colors.grey2, +} + +------------ +-- saving -- +------------ +o.swapfile = false +o.undofile = true +o.confirm = true + +------------ +-- search -- +------------ +o.ignorecase = true +o.smartcase = true +o.wrapscan = true +o.showmatch = true + +---------------- +-- wild menus -- +---------------- +o.wildoptions = 'pum' +o.pumblend = 3 +o.pumheight = 20 + +o.wildignorecase = true +o.wildignore = '*.o' + +----------- +-- netrw -- +----------- +g.netrw_banner = 0 +g.netrw_localcopydircmd = 'cp -r' +g.netrw_winsize = 30 +g.netrw_liststyle = 1 + +---------------- +-- highlights -- +---------------- +a.nvim_set_hl(0, "ColorColumn", { bg = colors.grey }) -- color column +a.nvim_set_hl(0, "Pmenu", { bg = colors.black2 }) +a.nvim_set_hl(0, "PmenuSel", { bg = colors.grey2 }) +a.nvim_set_hl(0, "CursorLineNr", { fg = colors.white, bold = true }) + +-- indent line colors +a.nvim_set_hl(0, "IndentBlanklineIndent1", { fg = colors.red } ) +a.nvim_set_hl(0, "IndentBlanklineIndent2", { fg = colors.orange } ) +a.nvim_set_hl(0, "IndentBlanklineIndent3", { fg = colors.yellow } ) +a.nvim_set_hl(0, "IndentBlanklineIndent4", { fg = colors.green } ) +a.nvim_set_hl(0, "IndentBlanklineIndent5", { fg = colors.blue } ) +a.nvim_set_hl(0, "IndentBlanklineIndent6", { fg = colors.purple } ) + +-- code window +a.nvim_set_hl(0, 'CodewindowBorder', {fg = copts.minimapcolor}) + +-- diagnostics +a.nvim_set_hl(0, "DiagnosticVirtualTextHint", { fg = "#ffffff", bg = "#1E1E1E" }) +a.nvim_set_hl(0, "DiagnosticVirtualTextInfo", { fg = "#006fd8", bg = "#152f47" }) +a.nvim_set_hl(0, "DiagnosticVirtualTextWarn", { fg = "#E9AD5A", bg = "#533221" }) +a.nvim_set_hl(0, "DiagnosticVirtualTextError", + { fg = "#ED3B44", bg = "#4b1313" }) + +-- cmp/treesitter stuff +a.nvim_set_hl(0, "CmpItemMenu", { fg = colors.purple, italic = true }) + +a.nvim_set_hl(0, "CmpItemKindSnippet", { bg = "#A377BF", bold = true }) +a.nvim_set_hl(0, "CmpItemKindText", { bg = "#63bc47", bold = true }) +a.nvim_set_hl(0, "CmpItemKindField", { bg = "#db7093", bold = true }) +a.nvim_set_hl(0, "CmpItemKindVariable", { bg = "#ff8c00", bold = true }) +a.nvim_set_hl(0, "CmpItemKindEnum", { bg = "#FF5733", bold = true }) +a.nvim_set_hl(0, "CmpItemKindFunction", { bg = "#483d8b", bold = true }) +a.nvim_set_hl(0, "CmpItemKindKeyword", { bg = "#FF339C", bold = true }) +a.nvim_set_hl(0, "CmpItemKindProperty", { bg = "#4FBF63", bold = true }) +a.nvim_set_hl(0, "CmpItemKindInterface", { bg = "#1e90ff", bold = true }) +a.nvim_set_hl(0, "CmpItemKindClass", { bg = "#4D4C5C", bold = true }) + +a.nvim_set_hl(0, "TreesitterContext", { bg = colors.grey }) + +-- telescope +a.nvim_set_hl(0, "TelescopeMatching", { bg = colors.black3 }) +a.nvim_set_hl(0, "TelescopeNormal", { bg = colors.black3 }) + +a.nvim_set_hl(0, "TelescopePreviewBorder", { bg = colors.black3 }) +a.nvim_set_hl(0, "TelescopePreviewNormal", { bg = colors.black3 }) +a.nvim_set_hl(0, "TelescopePreviewTitle", { bg = colors.black3, + fg = colors.black3 }) + +a.nvim_set_hl(0, "TelescopePromptBorder", { bg = colors.black2 }) +a.nvim_set_hl(0, "TelescopePromptNormal", { bg = colors.black2 }) +a.nvim_set_hl(0, "TelescopePromptPrefix", { bg = colors.black2 }) +a.nvim_set_hl(0, "TelescopePromptTitle", { bg = colors.black2, + fg = colors.black2 }) + +a.nvim_set_hl(0, "TelescopeResultsBorder", { bg = colors.black4 }) +a.nvim_set_hl(0, "TelescopeResultsNormal", { bg = colors.black4 }) +a.nvim_set_hl(0, "TelescopeResultsTitle", { bg = colors.black4, + fg = colors.black4 }) + +a.nvim_set_hl(0, "TelescopeSelection", { bg = colors.black2 }) +a.nvim_set_hl(0, "TelescopeSelectionCaret", { bg = colors.black2, + fg = colors.orange, bold = true }) |