Remove all org files using a new script to more config over, The old org file configuaration were great but required org. This new version only requires the scripts that is included in the repo. The configuration are all done but have not ported the theming system yet. Signed-off-by: Steve Beaulac <steve@sagacity.ca> Change-Id: I14cd7fe058a71c8ba9d6d35397dc8d7e6a6a6964
252 lines
7.9 KiB
Lua
252 lines
7.9 KiB
Lua
vim.g.mapleader = ' '
|
|
vim.g.maplocalleader = ' '
|
|
|
|
vim.g.have_nerd_fonts = true
|
|
|
|
-- set <space> as my leader key
|
|
vim.g.autoformat = true
|
|
|
|
-- vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
|
|
|
|
vim.g.editorconfig = true
|
|
|
|
vim.wo.number = true
|
|
|
|
vim.opt.background = "dark"
|
|
vim.opt.backup = false
|
|
vim.schedule(function()
|
|
vim.opt.clipboard = "unnamedplus"
|
|
end)
|
|
vim.opt.cmdheight = 1
|
|
vim.opt.completeopt = "menu,menuone,noselect"
|
|
vim.opt.conceallevel = 2
|
|
vim.opt.hlsearch = true
|
|
vim.opt.breakindent = true
|
|
vim.opt.ignorecase = true
|
|
vim.opt.formatoptions = "jcroqlnt"
|
|
vim.opt.grepformat = "%f:%l:%c:%m"
|
|
vim.opt.grepprg = "rg --vimgrep"
|
|
vim.opt.ignorecase = true
|
|
vim.opt.inccommand = "split"
|
|
vim.opt.list = true
|
|
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
|
vim.opt.mouse = "a"
|
|
vim.opt.pumblend = 10
|
|
vim.opt.pumheight = 10
|
|
vim.opt.showmode = false
|
|
vim.opt.showtabline = 0
|
|
vim.opt.smartcase = true
|
|
vim.opt.smartindent = true
|
|
vim.opt.splitbelow = true
|
|
vim.opt.splitright = true
|
|
-- vim.opt.splitkeep = "screen"
|
|
vim.opt.swapfile = false
|
|
vim.opt.termguicolors = true
|
|
vim.opt.undofile = true
|
|
vim.opt.undolevels = 10000
|
|
-- vim.opt.updatetime = 250 -- default 250
|
|
-- vim.opt.timeoutlen = 250 -- default 1000
|
|
vim.opt.timeout = false
|
|
vim.opt.writebackup = false
|
|
vim.opt.expandtab = true
|
|
vim.opt.shiftround = true
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.shortmess:append({ W = true, I = true, c = true, C = true })
|
|
vim.opt.spelllang = { "en" }
|
|
vim.opt.tabstop = 4
|
|
vim.opt.cursorline = true
|
|
vim.opt.number = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.laststatus = 3
|
|
vim.opt.showcmd = false
|
|
vim.opt.ruler = false
|
|
vim.opt.numberwidth = 4
|
|
vim.opt.signcolumn = "yes"
|
|
vim.opt.wrap = false
|
|
vim.opt.scrolloff = 8
|
|
vim.opt.sidescrolloff = 8
|
|
vim.opt.shell = "/bin/bash"
|
|
vim.opt.sessionoptions = { "blank", "buffers", "curdir", "tabpages", "winsize", "winpos", "terminal", "localoptions", "help", "skiprtp", "folds" }
|
|
vim.opt.virtualedit = "block"
|
|
vim.opt.wildmode = "longest:full,full"
|
|
vim.opt.winminwidth = 5
|
|
-- vim.opt.hidden = false
|
|
vim.opt.cindent = true
|
|
vim.opt.autoindent = true
|
|
|
|
if vim.fn.has("nvim-0.10") == 1 then
|
|
vim.opt.smoothscroll = true
|
|
end
|
|
|
|
vim.opt.foldmethod = "expr"
|
|
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
|
vim.opt.foldlevel = 99
|
|
vim.opt.nu = true
|
|
vim.opt.errorbells = false
|
|
vim.opt.belloff = "all"
|
|
vim.opt.undodir = vim.fn.stdpath('data') .. "/undodir"
|
|
vim.opt.softtabstop = 4
|
|
vim.opt.incsearch = true
|
|
-- vim.opt.fillchars.eob = " "
|
|
-- vim.opt.shortmess:append("c")
|
|
-- vim.opt.whichwrap:append("<,>,[,],h,l")
|
|
-- vim.opt.iskeyword:append(".")
|
|
-- vim.o.isfname:append("@-@")
|
|
-- vim.o.colorcolumn = "80"
|
|
|
|
-- Put this at the top of 'init.lua'
|
|
local path_package = vim.fn.stdpath('data') .. '/site'
|
|
local mini_path = path_package .. '/pack/deps/start/mini.nvim'
|
|
if not vim.loop.fs_stat(mini_path) then
|
|
vim.cmd('echo "Installing `mini.nvim`" | redraw')
|
|
local clone_cmd = {
|
|
'git', 'clone', '--filter=blob:none',
|
|
-- Uncomment next line to use 'stable' branch
|
|
-- '--branch', 'stable',
|
|
'https://github.com/echasnovski/mini.nvim', mini_path
|
|
}
|
|
vim.fn.system(clone_cmd)
|
|
vim.cmd('packadd mini.nvim | helptags ALL')
|
|
end
|
|
|
|
-- add({ 'echasnovski/mini.ai' })
|
|
-- add({ 'echasnovski/mini.align' })
|
|
-- add({ 'echasnovski/mini.operators' })
|
|
-- add({ 'echasnovski/mini.bracketed' })
|
|
-- add({ 'echasnovski/mini.operators' })
|
|
-- add({ 'echasnovski/mini.surround' })
|
|
-- add({ 'echasnovski/mini.statusline' })
|
|
-- add({ 'echasnovski/mini.tabline' })
|
|
|
|
-- add({ 'echasnovski/mini.hipatterns' })
|
|
|
|
require('mini.extra').setup()
|
|
require('mini.ai').setup({
|
|
custom_textobjects = {
|
|
B = MiniExtra.gen_ai_spec.buffer(),
|
|
I = MiniExtra.gen_ai_spec.indent(),
|
|
L = MiniExtra.gen_ai_spec.line(),
|
|
},
|
|
})
|
|
|
|
require('mini.align').setup()
|
|
require('mini.bracketed').setup()
|
|
|
|
local hi_words = MiniExtra.gen_highlighter.words
|
|
require('mini.hipatterns').setup({
|
|
highlighters = {
|
|
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
|
|
fixme = hi_words({ 'FIXME', 'Fixme', 'fixme' }, "MiniHipatternsFixme"),
|
|
hack = hi_words({ 'HACK', 'Hack', 'hack' }, "MiniHipatternsHack"),
|
|
todo = hi_words({ 'TODO', 'Todo', 'todo' }, "MiniHipatternsTodo"),
|
|
note = hi_words({ 'NOTE', 'Note', 'note' }, "MiniHipatternsNote"),
|
|
|
|
-- Highlight hex color strings (`#rrggbb`) using that color
|
|
-- hex_color = hipatterns.gen_highlighter.hex_color(),
|
|
},
|
|
})
|
|
|
|
require("mini.surround").setup({
|
|
-- Add custom surroundings to be used on top of builtin ones. For more
|
|
-- information with examples, see `:h MiniSurround.config`.
|
|
-- custom_surroundings = {
|
|
-- s = { input = { '%[%[().-()%]%]' }, output = { left = '[[', right = ']]' } },
|
|
-- },
|
|
mappings = {
|
|
add = 'sa', -- Add surrounding in Normal and Visual modes
|
|
delete = 'sd', -- Delete surrounding
|
|
find = 'sf', -- Find surrounding (to the right)
|
|
find_left = 'sF', -- Find surrounding (to the left)
|
|
highlight = 'sh', -- Highlight surrounding
|
|
replace = 'sr', -- Replace surrounding
|
|
update_n_lines = 'sn', -- Update `n_lines`
|
|
|
|
suffix_last = 'l', -- Suffix to search with "prev" method
|
|
suffix_next = 'n', -- Suffix to search with "next" method
|
|
},
|
|
})
|
|
|
|
require("mini.operators").setup({
|
|
evaluate = { prefix = 'g=', func = nil, },
|
|
exchange = { prefix = 'g.', reindent_linewise = true, },
|
|
multiply = { prefix = 'gm', func = nil, },
|
|
replace = { prefix = 'gk', reindent_linewise = true, },
|
|
sort = { prefix = 'gs', func = nil, }
|
|
})
|
|
|
|
local miniclue = require('mini.clue')
|
|
miniclue.setup({
|
|
triggers = {
|
|
-- Leader triggers
|
|
{ mode = 'n', keys = '<Leader>' },
|
|
{ mode = 'x', keys = '<Leader>' },
|
|
|
|
-- Built-in completion
|
|
{ mode = 'i', keys = '<C-x>' },
|
|
|
|
-- `g` key
|
|
{ mode = 'n', keys = 'g' },
|
|
{ mode = 'x', keys = 'g' },
|
|
|
|
-- Marks
|
|
{ mode = 'n', keys = "'" },
|
|
{ mode = 'n', keys = '`' },
|
|
{ mode = 'x', keys = "'" },
|
|
{ mode = 'x', keys = '`' },
|
|
|
|
-- Registers
|
|
{ mode = 'n', keys = '"' },
|
|
{ mode = 'x', keys = '"' },
|
|
{ mode = 'i', keys = '<C-r>' },
|
|
{ mode = 'c', keys = '<C-r>' },
|
|
|
|
-- Window commands
|
|
{ mode = 'n', keys = '<C-w>' },
|
|
|
|
-- `z` key
|
|
{ mode = 'n', keys = 'z' },
|
|
{ mode = 'x', keys = 'z' },
|
|
},
|
|
|
|
clues = {
|
|
-- Enhance this by adding descriptions for <Leader> mapping groups
|
|
miniclue.gen_clues.builtin_completion(),
|
|
miniclue.gen_clues.g(),
|
|
miniclue.gen_clues.marks(),
|
|
miniclue.gen_clues.registers(),
|
|
miniclue.gen_clues.windows(),
|
|
miniclue.gen_clues.z(),
|
|
},
|
|
})
|
|
|
|
require('mini.bufremove').setup()
|
|
require('mini.comment').setup()
|
|
require('mini.completion').setup()
|
|
require('mini.cursorword').setup()
|
|
require('mini.diff').setup()
|
|
require('mini.files').setup()
|
|
require('mini.fuzzy').setup()
|
|
require('mini.git').setup()
|
|
require('mini.icons').setup()
|
|
require('mini.jump').setup()
|
|
require('mini.move').setup()
|
|
require('mini.pick').setup()
|
|
require('mini.sessions').setup()
|
|
require('mini.splitjoin').setup()
|
|
require('mini.jump2d').setup()
|
|
require('mini.visits').setup()
|
|
require('mini.statusline').setup()
|
|
require('mini.tabline').setup()
|
|
|
|
vim.keymap.set('n', '<leader>f', '<cmd>Pick files<cr>', { desc = "Pick files" })
|
|
vim.keymap.set('n', '<leader>j', '<cmd>Pick oldfiles<cr>', { desc = "Pick files" })
|
|
vim.keymap.set('n', '<leader>/', '<cmd>Pick grep_live<cr>', { desc = "live grep" })
|
|
vim.keymap.set('n', '<leader>s/', '<cmd>Pick buf_lines<cr>', { desc = 'search in buffer' })
|
|
vim.keymap.set('n', '<leader>sk', '<cmd>Pick keymaps<cr>', { desc = 'search in buffer' })
|
|
vim.keymap.set('n', '<leader>sm', '<cmd>Pick marks<cr>', { desc = 'search in buffer' })
|
|
vim.keymap.set('n', '<leader><space>', '<cmd>Pick buffers<cr>', { desc = 'find buffer' })
|
|
vim.keymap.set('n', '<leader>q', '<cmd>Pick diagnostic<cr>', { desc = 'find diagnostic' })
|
|
vim.keymap.set('n', '<leader>-', '<cmd>Pick explorer<cr>', { desc = 'explorer' })
|
|
vim.keymap.set('n', '<M-x>', '<cmd>Pick commands<cr>', { desc = 'commands' })
|
|
vim.cmd("colorscheme minicyan")
|