diff options
Diffstat (limited to 'lua/core')
-rw-r--r-- | lua/core/appearance.lua | 52 | ||||
-rw-r--r-- | lua/core/colorscheme.lua | 3 | ||||
-rw-r--r-- | lua/core/keymaps.lua | 46 | ||||
-rw-r--r-- | lua/core/options.lua | 90 | ||||
-rw-r--r-- | lua/core/settings.lua | 21 | ||||
-rw-r--r-- | lua/core/utils.lua | 17 |
6 files changed, 0 insertions, 229 deletions
diff --git a/lua/core/appearance.lua b/lua/core/appearance.lua deleted file mode 100644 index ba73502..0000000 --- a/lua/core/appearance.lua +++ /dev/null @@ -1,52 +0,0 @@ -local opt = vim.opt -- Set options (global/buffer/windows-scoped) - ------------------------------------------------------------ --- Neovim UI ------------------------------------------------------------ -opt.number = true -- Show line number -opt.relativenumber = true -- Show relative line number -opt.showmatch = true -- Highlight matching parenthesis -opt.foldmethod = 'marker' -- Enable folding (default 'foldmarker') -opt.splitright = true -- Vertical split to the right -opt.splitbelow = true -- Horizontal split to the bottom -opt.ignorecase = true -- Ignore case letters when search -opt.smartcase = true -- Ignore lowercase for the whole pattern -opt.linebreak = true -- Wrap on word boundary -opt.termguicolors = true -- Enable 24-bit RGB colors -opt.laststatus = 2 -- Set global statusline -opt.splitbelow = true -opt.splitright = true -opt.scrolloff = 2 -opt.sidescrolloff = 5 -opt.foldlevelstart = 99 -opt.ruler = false -opt.list = true -opt.showtabline = 0 -opt.winwidth = 30 -opt.winminwidth = 10 -opt.pumheight = 15 -opt.helpheight = 12 -opt.previewheight = 12 -opt.showcmd = false -opt.listchars = 'tab:░ ,extends:›,precedes:‹,nbsp:·,trail:·' -opt.background = 'dark' -opt.cmdheight = 2 -opt.fillchars = { - diff = "╱", - vert = "│", - fold = "⠀", - eob = " ", -- suppress ~ at EndOfBuffer - --diff = "⣿", -- alternatives = ⣿ ░ ─ ╱ - msgsep = "‾", - foldopen = "▾", - foldsep = "│", - foldclose = "▸", -} - -vim.cmd [[ - " Function, identifier and comments in italic - highlight Function cterm=italic gui=italic - highlight Indentifier cterm=none gui=italic - highlight Comment cterm=italic gui=italic -]] -vim.cmd[[ "syntax sync fromstart" ]] diff --git a/lua/core/colorscheme.lua b/lua/core/colorscheme.lua deleted file mode 100644 index 5402f11..0000000 --- a/lua/core/colorscheme.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Default options: --- vim.cmd.colorscheme "oxocarbon" -vim.cmd("colorscheme kanagawa-dragon") diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua deleted file mode 100644 index 1305224..0000000 --- a/lua/core/keymaps.lua +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------ --- Define keymaps of Neovim and installed plugins. ------------------------------------------------------------ - -local function map(mode, lhs, rhs, opts) - local options = { noremap = true, silent = true } - if opts then - options = vim.tbl_extend('force', options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - --- Change leader to a comma -vim.g.mapleader = ',' - ------------------------------------------------------------ --- Neovim shortcuts ------------------------------------------------------------ - --- Disable arrow keys -map('', '<up>', '<nop>') -map('', '<down>', '<nop>') -map('', '<left>', '<nop>') -map('', '<right>', '<nop>') - --- Reload configuration without restart nvim -map('n', '<leader>r', ':so %<CR>') - --- Change split orientation -map('n', '<leader>tk', '<C-w>t<C-w>K') -- change vertical to horizontal -map('n', '<leader>th', '<C-w>t<C-w>H') -- change horizontal to vertical - -map('n', 'M-j', ':resize -2<CR>') -map('n', 'M-k', ':resize +2<CR>') -map('n', 'M-l', ':vertical resize -2<CR>') -map('n', 'M-h', ':vertical resize +2<CR>') - -map('t', 'C-w', '<C-\\><C-n><C-w>') - -map('n', '<leader>B', ':Buffers<CR>') -- FZF show open buffers -map('n', '<leader>F', ':Files<CR>') -- FZF show files -map('n', '<leader>A', ':Rg<CR>') -- FZF call ripgrep -map('n', '<leader>C', ':Commits<CR>') -- FZF show git commits -map('n', '<leader>M', ':Maps<CR>') -- FZF show normal mode mappings - -map('n', '<leader>e', ':NvimTreeToggle<CR>') diff --git a/lua/core/options.lua b/lua/core/options.lua deleted file mode 100644 index 5a53b42..0000000 --- a/lua/core/options.lua +++ /dev/null @@ -1,90 +0,0 @@ ------------------------------------------------------------ --- General Neovim settings and configuration ------------------------------------------------------------ - -local g = vim.g -- Global variables -local opt = vim.opt -- Set options (global/buffer/windows-scoped) -local cache_dir = os.getenv('HOME') .. '/.cache/nvim/' - ------------------------------------------------------------ --- General ------------------------------------------------------------ -opt.mouse = 'a' -- Enable mouse support -opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard -opt.swapfile = false -- Don't use swapfile -opt.completeopt = 'menuone,noinsert,noselect' -- Autocomplete options -opt.history = 500 -- Lines vim should remember -opt.backup = false -opt.writebackup = false -opt.shell = 'zsh' -opt.magic = true -- Vim's regular expression magic -opt.mat = 2 -- How many tenths of seconds ro blink -opt.fileformats = 'unix,mac,dos' -- Unix as standard file format -opt.encoding = 'utf-8' -- Encoding -opt.viewoptions = 'folds,cursor,curdir,slash,unix' -opt.wildignorecase = true -opt.wildignore = '.git,.hg,.svn,*.pyc,*.o,*.out,*.jpg,*.jpeg,*.png,*.gif,*.zip,*.DS_Store,**/node_modules/**,**/bower_modules/**' -opt.hlsearch = false -- No highlight search -opt.incsearch = true -opt.ignorecase = true -opt.backspace = 'indent,eol,start' -opt.exrc = true - ------------------------------------------------------------ --- Tabs, indent ------------------------------------------------------------ -opt.shiftwidth = 4 -- Shift 4 spaces when tab -opt.tabstop = 4 -- 1 tab == 4 spaces -opt.softtabstop = 4 -- 1 tab == 4 spaces -opt.expandtab = false -- Use spaces instead of tabs -opt.smartindent = true -- Autoindent new lines -opt.autoindent = true -- Copy indent from current line when starting new line -opt.cindent = true -- C programming indentation - ------------------------------------------------------------ --- Memory, CPU ------------------------------------------------------------ -opt.hidden = true -- Enable background buffers -opt.lazyredraw = true -- Faster scrolling -opt.synmaxcol = 240 -- Max column for syntax highlight -opt.updatetime = 300 -- ms to wait for trigger an event -opt.timeoutlen = 500 -- ms to wait for a mapped sequence to complete. -opt.foldenable = false - ------------------------------------------------------------ --- Startup ------------------------------------------------------------ --- Disable nvim intro -opt.shortmess:append "csI" - --- -- Disable builtin plugins -local disabled_built_ins = { - "2html_plugin", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "synmenu", - "optwin", - "compiler", - "bugreport", -} - -for _, plugin in pairs(disabled_built_ins) do - g["loaded_" .. plugin] = 1 -end diff --git a/lua/core/settings.lua b/lua/core/settings.lua deleted file mode 100644 index 6d0b3c5..0000000 --- a/lua/core/settings.lua +++ /dev/null @@ -1,21 +0,0 @@ --- --- Mainly filetype settings --- - -local cmd = vim.cmd -local u = require('core/utils') - -u.create_augroup({ - { 'BufRead,BufNewFile', '/tmp/nail-*', 'setlocal', 'ft=mail' }, - { 'BufRead,BufNewFile', '*s-nail-*', 'setlocal', 'ft=mail' }, - { 'BufRead,BufNewFile', '*mutt-*', 'setlocal', 'ft=mail' }, - { 'BufRead', '/tmp/*mutt-*', 'setlocal', 'tw=72' }, -}, 'ftmail') - --- Autoremove unwanted whitespaces -cmd [[ - au BufRead,BufNewFile *mutt-* setfiletype mail -]] - --- Add in the following like to auto remove empty lines --- au BufWritePre * %s/\s\+$//e diff --git a/lua/core/utils.lua b/lua/core/utils.lua deleted file mode 100644 index 7c8a7bf..0000000 --- a/lua/core/utils.lua +++ /dev/null @@ -1,17 +0,0 @@ --- --- Auto group utilites --- - -local M = {} -local cmd = vim.cmd - -function M.create_augroup(autocmds, name) - cmd('augroup ' .. name) - cmd('autocmd!') - for _, autocmd in ipairs(autocmds) do - cmd('autocmd ' .. table.concat(autocmd, ' ')) - end - cmd('augroup END') -end - -return M |