initial commit
This commit is contained in:
parent
dc5408f1a2
commit
9889f6c4ee
35 changed files with 1302 additions and 0 deletions
2
lua/pika/core/init.lua
Normal file
2
lua/pika/core/init.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
require("pika.core.options")
|
||||
require("pika.core.keymaps")
|
79
lua/pika/core/keymaps.lua
Normal file
79
lua/pika/core/keymaps.lua
Normal file
|
@ -0,0 +1,79 @@
|
|||
vim.g.mapleader = ' '
|
||||
|
||||
-- ─< lua/keymaps.lua >─────────────────────────────────────────────────────────────────
|
||||
-- local nomap = vim.keymap.del
|
||||
-- nomap('i', '<C-k>')
|
||||
-- nomap('n', '<C-k>')
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- ─< Comment >─────────────────────────────────────────────────────────────────────────
|
||||
map('n', '<S-c>', 'gcc', { desc = 'comment toggle', remap = true })
|
||||
map('v', '<S-c>', 'gc', { desc = 'comment toggle', remap = true })
|
||||
|
||||
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
|
||||
map('t', '<C-x>', '<C-\\><C-N>', { desc = 'terminal escape terminal mode' })
|
||||
|
||||
-- ─< Movement while in "insert"-mode >─────────────────────────────────────────────────
|
||||
map('i', '<C-b>', '<ESC>^i', { desc = 'move beginning of line' })
|
||||
map('i', '<C-e>', '<End>', { desc = 'move end of line' })
|
||||
map('i', '<C-h>', '<Left>', { desc = 'move left' })
|
||||
map('i', '<C-l>', '<Right>', { desc = 'move right' })
|
||||
map('i', '<C-j>', '<Down>', { desc = 'move down' })
|
||||
map('i', '<C-k>', '<Up>', { desc = 'move up' })
|
||||
-- ───────────────────────────────────< Add yours here >───────────────────────────────────
|
||||
|
||||
map('n', ';', ':', { desc = 'CMD enter command mode' })
|
||||
map('i', 'jk', '<ESC>')
|
||||
map('i', '<C-c>', '<ESC>')
|
||||
map('n', '<C-c>', '<ESC>')
|
||||
map('v', '<C-c>', '<ESC>')
|
||||
|
||||
map('n', '<leader>x', '<cmd>bd!<CR>')
|
||||
|
||||
-- ─< Activate color plugin >───────────────────────────────────────────────────────────
|
||||
map('n', '<leader>C', '<cmd>ColorizerToggle<CR>')
|
||||
|
||||
--─< Toggle NvimTree >─────────────────────────────────────────────────────────────────
|
||||
map('n', '<leader>e', ':NvimTreeToggle<CR>', { noremap = true, silent = true, desc = '[e]xplorer' })
|
||||
|
||||
-- ─< Disable arrow keys in normal mode >───────────────────────────────────────────────
|
||||
map('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
map('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
map('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
map('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
map('n', '<leader>l', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
map('n', '<leader>h', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
map('n', '<leader>j', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
map('n', '<leader>k', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
map('n', '<leader>p', vim.cmd.Ex)
|
||||
map('n', '<leader>q', vim.cmd.q)
|
||||
map('n', '<leader>s', vim.cmd.w)
|
||||
|
||||
-- ─< Comment-Box mappings >────────────────────────────────────────────────────────────
|
||||
map('n', '<leader>cd', '<Cmd>CBd<CR>', { noremap = true, silent = true, desc = '[c]ommentbox [d]elete' })
|
||||
map('v', '<leader>cd', '<Cmd>CBd<CR>', { noremap = true, silent = true, desc = '[c]ommentbox [d]elete' })
|
||||
|
||||
map('n', '<leader>cy', '<Cmd>CBy<CR>', { noremap = true, silent = true, desc = '[y]ank content of Commentbox' })
|
||||
map('v', '<leader>cy', '<Cmd>CBy<CR>', { noremap = true, silent = true, desc = '[y]ank content of Commentbox' })
|
||||
|
||||
map('n', '<leader>cb', '<Cmd>CBlabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox' })
|
||||
map('v', '<leader>cb', '<Cmd>CBlabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox' })
|
||||
map('n', '<leader>cB', '<Cmd>CBcabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox (B)centered' })
|
||||
map('v', '<leader>cB', '<Cmd>CBcabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox (B)centered' })
|
||||
map('n', '<leader>cc', '<Cmd>CBllbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment' })
|
||||
map('v', '<leader>cc', '<Cmd>CBllbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment' })
|
||||
map('n', '<leader>cC', '<Cmd>CBclbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment (C)entered' })
|
||||
map('v', '<leader>cC', '<Cmd>CBclbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment (C)entered' })
|
||||
|
||||
map('n', '<leader>cl', '<Cmd>CBllline8<CR>', { noremap = true, silent = true, desc = '[c]reate comment [l]ine' })
|
||||
map('n', '<leader>cL', '<Cmd>CBlcline8<CR>', { noremap = true, silent = true, desc = '[c]reate comment [L]ine' })
|
||||
|
||||
-- ─< LoremIpsum generator >────────────────────────────────────────────────────────────
|
||||
map('n', '<leader>L', ':LoremIpsum ')
|
||||
|
||||
-- window management
|
||||
map('n', '<leader>sv', '<C-w>v', { desc = 'Split window vertically' }) -- split window vertically
|
||||
map('n', '<leader>sh', '<C-w>s', { desc = 'Split window horizontally' }) -- split window horizontally
|
64
lua/pika/core/options.lua
Normal file
64
lua/pika/core/options.lua
Normal file
|
@ -0,0 +1,64 @@
|
|||
vim.cmd 'let g:netrw_liststyle = 3'
|
||||
|
||||
local o = vim.opt
|
||||
|
||||
o.relativenumber = true
|
||||
o.number = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
o.scrolloff = 8
|
||||
|
||||
-- tabs & indentation
|
||||
o.tabstop = 2 -- 2 spaces for tabs (prettier default)
|
||||
o.shiftwidth = 2 -- 2 spaces for indent width
|
||||
o.softtabstop = 2
|
||||
o.expandtab = true -- expand tab to spaces
|
||||
o.autoindent = true -- copy indent from current line when starting new one
|
||||
|
||||
o.mouse = 'a'
|
||||
o.wrap = false
|
||||
|
||||
-- search settings
|
||||
o.ignorecase = true -- ignore case when searching
|
||||
o.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
|
||||
|
||||
o.cursorline = true
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
o.showmode = false
|
||||
|
||||
-- turn on termguicolors for tokyonight colorscheme to work
|
||||
-- (have to use iterm2 or any other true color terminal)
|
||||
o.termguicolors = true
|
||||
o.background = 'dark' -- colorschemes that can be light or dark will be made dark
|
||||
o.signcolumn = 'yes' -- show sign column so that text doesn't shift
|
||||
|
||||
-- backspace
|
||||
o.backspace = 'indent,eol,start' -- allow backspace on indent, end of line or insert mode start position
|
||||
|
||||
-- clipboard
|
||||
o.clipboard:append 'unnamedplus' -- use system clipboard as default register
|
||||
|
||||
-- split windows
|
||||
o.splitright = true -- split vertical window to the right
|
||||
o.splitbelow = true -- split horizontal window to the bottom
|
||||
|
||||
-- turn off swapfile
|
||||
o.swapfile = false
|
||||
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set cursor to beam when entering Neovim
|
||||
vim.cmd [[
|
||||
augroup ChangeCursorShape
|
||||
autocmd!
|
||||
autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
|
||||
autocmd VimLeave * set guicursor=a:ver25
|
||||
augroup END
|
||||
]]
|
Loading…
Add table
Add a link
Reference in a new issue