diff --git a/nvim/lua/kanopo/init.lua b/nvim/lua/kanopo/init.lua new file mode 100644 index 0000000..a4881ad --- /dev/null +++ b/nvim/lua/kanopo/init.lua @@ -0,0 +1,4 @@ +require('kanopo.pack') +require('kanopo.options') + +require('kanopo.plugins.gruvbox') diff --git a/nvim/lua/kanopo/options.lua b/nvim/lua/kanopo/options.lua new file mode 100644 index 0000000..a788437 --- /dev/null +++ b/nvim/lua/kanopo/options.lua @@ -0,0 +1,65 @@ +require('vim._core.ui1').enable() + +-- Leader keys (set early) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- UI and appearance +vim.o.termguicolors = true -- 24-bit colors in TUI +vim.o.cursorline = true -- highlight current line +vim.o.number = true -- absolute line numbers +vim.o.relativenumber = true -- relative line numbers +vim.o.signcolumn = "yes" -- always show signcolumn +vim.o.colorcolumn = "100" -- visual column guide +vim.o.winborder = "rounded" -- default floating window border +vim.o.cmdheight = 0 -- minimal command-line height (NVIM 0.10+) +vim.o.conceallevel = 2 -- conceal in Markdown/jsonc when appropriate +vim.o.foldlevel = 0 -- start with folds closed (Treesitter can open) + +-- Splits +vim.o.splitright = true -- open vertical splits to the right +vim.o.splitbelow = true -- open horizontal splits below + +-- Editing behavior +vim.o.wrap = false -- do not wrap lines by default +vim.o.breakindent = true -- keep indentation on wrapped lines (if wrap is enabled later) +vim.o.clipboard = "unnamedplus" +vim.o.swapfile = false -- no swapfiles +vim.o.undofile = true -- persistent undo +vim.o.writebackup = false -- do not keep backup around + +-- Tabs and indentation (2-space default; override per-filetype with autocmds) +vim.o.expandtab = true +vim.o.tabstop = 2 +vim.o.softtabstop = 2 +vim.o.shiftwidth = 2 + +-- Search +vim.o.ignorecase = true -- case-insensitive +vim.o.smartcase = true -- unless uppercase is used + +-- Completion UX (good defaults for omni and popup behavior) +vim.o.completeopt = "menu,menuone,noinsert,noselect" +-- vim.o.shortmess = (vim.o.shortmess or "") .. "c" -- reduce completion messages + +-- Performance and input timing +vim.o.timeoutlen = 300 -- mapped sequence timeout +vim.o.updatetime = 250 -- faster CursorHold/diagnostic updates +vim.o.scrolloff = 10 -- context lines around cursor + +-- Fonts/icons (used by statuslines/UIs) +vim.g.have_nerd_font = true + + +-- Netrw (disable if using an explorer plugin like oil.nvim; enable if you rely on netrw) +vim.g.loaded_netrw = 0 +vim.g.loaded_netrwPlugin = 0 + +vim.o.mouse = "a" +vim.o.showmode = false +vim.o.list = true +vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } + +-- Preview substitutions live, as you type! +vim.o.inccommand = "split" +vim.o.confirm = true diff --git a/nvim/lua/kanopo/pack.lua b/nvim/lua/kanopo/pack.lua new file mode 100644 index 0000000..81cf0ed --- /dev/null +++ b/nvim/lua/kanopo/pack.lua @@ -0,0 +1,6 @@ + +vim.pack.add({ + { src = "https://github.com/ellisonleao/gruvbox.nvim" }, +}, { + confirm = false, +}) diff --git a/nvim/lua/kanopo/plugins/gruvbox.lua b/nvim/lua/kanopo/plugins/gruvbox.lua new file mode 100644 index 0000000..a3dfb8c --- /dev/null +++ b/nvim/lua/kanopo/plugins/gruvbox.lua @@ -0,0 +1,8 @@ + +local ok, gruvbox = pcall(require, "gruvbox") +if ok then + gruvbox.setup() + vim.cmd.colorscheme("gruvbox") +else + vim.notify(gruvbox, vim.log.levels.ERROR) +end