First release
This commit is contained in:
Executable
+122
@@ -0,0 +1,122 @@
|
||||
vim.g.mapleader = " "
|
||||
|
||||
local keymap = vim.keymap
|
||||
|
||||
-- Modes
|
||||
--
|
||||
-- "n" = normal mode
|
||||
-- "i" = insert mode
|
||||
-- "v" = visual mode
|
||||
-- "x" = visual block mode
|
||||
-- "t" = term mode
|
||||
-- "c" = command mode
|
||||
--
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Normal
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Window splitting
|
||||
keymap.set( "n", "<leader>sv", "<C-w>v" ) -- split widow vertically
|
||||
keymap.set( "n", "<leader>sh", "<C-w>s" ) -- split widow horizontaly
|
||||
keymap.set( "n", "<leader>se", "<C-w>=" ) -- make split windows equal width
|
||||
keymap.set( "n", "<leader>sx", ":close<CR>" ) -- close window
|
||||
-- keymap.set( "n", "<leader>sm", ":MaximizerToggle<CR>" )
|
||||
keymap.set( "n", "<leader>sm", '<cmd>lua require("maximizer").toggle()<CR>', {silent = true, noremap = true})
|
||||
-- keymap.set('n', 'mm', '<cmd>lua require("maximizer").maximize()<CR>', {silent = true, noremap = true})
|
||||
-- keymap.set('n', 'mr', '<cmd>lua require("maximizer").restore()<CR>', {silent = true, noremap = true})
|
||||
--
|
||||
|
||||
-- Window navigation
|
||||
keymap.set( "n", "<C-h>", "<C-w>h")
|
||||
keymap.set( "n", "<C-j>", "<C-w>j")
|
||||
keymap.set( "n", "<C-k>", "<C-w>k")
|
||||
keymap.set( "n", "<C-l>", "<C-w>l")
|
||||
|
||||
--
|
||||
-- Insert date
|
||||
--
|
||||
keymap.set( "n", "<leader><leader>d", ":pu=strftime('%Y-%m-%d')<CR>" )
|
||||
|
||||
--
|
||||
--
|
||||
--
|
||||
--keymap.set( "n", "<leader><leader>f", ":toggle-fullscreen<CR>" )
|
||||
-- Resize window with arrows
|
||||
-- keymap.set( "n", "<A-h>", ":vertical resize -2<cr>")
|
||||
-- keymap.set( "n", "<A-l>", ":vertical resize +2<cr>")
|
||||
-- keymap.set( "n", "<A-k>", ":resize +2<cr>")
|
||||
-- keymap.set( "n", "<A-j>", ":resize -2<cr>")
|
||||
|
||||
-- keymap.set( "n", "<leader>e", ":Lex 30 <cr>")
|
||||
|
||||
-- Buffers
|
||||
keymap.set( "n", "<S-l>", ":bnext<cr>" ) -- next buffer
|
||||
keymap.set( "n", "<S-h>", ":bprevious<cr>" ) -- prev buffer
|
||||
keymap.set( "n", "<C-w>", ":bd<CR>" ) -- delete buffer
|
||||
|
||||
-- TABs
|
||||
keymap.set( "n", "<leader>to", ":tabnew<CR>" ) -- open new tab
|
||||
keymap.set( "n", "<leader>tx", ":tabclose<CR>" ) -- close current tab
|
||||
keymap.set( "n", "<leader>tn", ":tabn<CR>" ) -- go to next tab
|
||||
keymap.set( "n", "<leader>tp", ":tabp<CR>" ) -- go to prev tab
|
||||
|
||||
-- diagnostic warning/error navigation
|
||||
keymap.set( "n", "g[", vim.diagnostic.goto_prev)
|
||||
keymap.set( "n", "g]", vim.diagnostic.goto_next)
|
||||
|
||||
--
|
||||
keymap.set( "n", ",", "*" ) -- due to HUN keybard, the * hard to access:
|
||||
|
||||
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Insert mode
|
||||
-- ----------------------------------------------------------------------------
|
||||
keymap.set("i", "jk", "<ESC>")
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Visual mode
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Stay in indent mode
|
||||
keymap.set("v", "<", "<gv")
|
||||
keymap.set("v", ">", ">gv")
|
||||
|
||||
-- Visual Block --
|
||||
keymap.set("v", "<A-j>", ":m .+1<CR>==")
|
||||
keymap.set("v", "<A-k>", ":m .-2<CR>==")
|
||||
keymap.set("v", "p", '"_dP')
|
||||
|
||||
-- Move text up and down
|
||||
keymap.set( "x", "J", ":move '>+1<CR>gv-gv")
|
||||
keymap.set( "x", "K", ":move '<-2<CR>gv-gv")
|
||||
keymap.set( "x", "<A-j>", ":move '>+1<CR>gv-gv")
|
||||
keymap.set( "x", "<A-k>", ":move '<-2<CR>gv-gv")
|
||||
|
||||
|
||||
-- Terminal --
|
||||
-- Better terminal navigation
|
||||
keymap.set( "t", "<C-h>", "<C-\\><C-N><C-w>h")
|
||||
keymap.set( "t", "<C-j>", "<C-\\><C-N><C-w>j")
|
||||
keymap.set( "t", "<C-k>", "<C-\\><C-N><C-w>k")
|
||||
keymap.set( "t", "<C-l>", "<C-\\><C-N><C-w>l")
|
||||
|
||||
keymap.set("n", "<leader>nh", ":nohl<CR>")
|
||||
keymap.set("n", "x", '"_x"')
|
||||
|
||||
keymap.set("n", "<C-TAB>", ":tabn<CR>") -- go to next tab
|
||||
keymap.set("n", "<C-S-TAB>", ":tabp<CR>") -- go to prev tab
|
||||
-- plugin keymaps
|
||||
|
||||
-- nvim-tree
|
||||
keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>")
|
||||
|
||||
-- telescope
|
||||
--keymap.set("n", "<leader>ff", ":Telescope find_files<cr>" )
|
||||
keymap.set("n", "<leader>ff", ":Files<cr>" )
|
||||
keymap.set("n", "<leader>fs", ":Telescope live_grep<cr>" )
|
||||
keymap.set("n", "<leader>fg", ":Rg<cr>")
|
||||
keymap.set("n", "<leader>fb", ":Telescope buffers<cr>" )
|
||||
keymap.set("n", "<leader>fh", ":Telescope help_tags<cr>" )
|
||||
|
||||
keymap.set("n", "<leader>x", "<cmd>lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))<cr>")
|
||||
keymap.set("n", "<c-t>", "<cmd>Telescope live_grep<cr>")
|
||||
Executable
+121
@@ -0,0 +1,121 @@
|
||||
local opt = vim.opt
|
||||
|
||||
-- [[ Font ]]
|
||||
--opt.guifont = { "SauceCodePro NF:h11:r:#e-subpixelantialias:#h-none" }
|
||||
--opt.guifont = { "BlexMono NFM:h11:l:i:#e-subpixelantialias:#h-none" }
|
||||
opt.guifont = { "BlexMono NFM:h11:l:#e-subpixelantialias:#h-none" }
|
||||
|
||||
-- [[ Context ]]
|
||||
opt.number = true -- set numbered lines
|
||||
opt.relativenumber = true -- show relative numbers
|
||||
opt.numberwidth = 4 -- set line number column width to 4
|
||||
opt.colorcolumn = '100' -- show color for max line length
|
||||
|
||||
-- [[ Whitespace ]]
|
||||
opt.expandtab = true -- convert tabs to spaces
|
||||
opt.shiftwidth = 4 -- size of an indent
|
||||
opt.softtabstop = 4 -- number of spaces tabs count for in insert mode
|
||||
opt.tabstop = 4 -- number of spaces tabs count for
|
||||
|
||||
opt.autoindent = true
|
||||
|
||||
-- [[ Filetypes ]]
|
||||
opt.encoding = 'utf8' -- string encoding
|
||||
opt.fileencoding = 'utf8' -- file encoding
|
||||
|
||||
-- [[ Theme ]]
|
||||
opt.syntax = 'ON' -- allow syntax highlighting
|
||||
opt.termguicolors = true -- set term gui colors (most terminals support this)
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- line wrapping
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
opt.wrap = false -- display lines as one long line
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- search settings
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- [[ Search ]]
|
||||
opt.ignorecase = true -- ignore case in search patterns
|
||||
opt.smartcase = true -- override ignorecase if search contains capital
|
||||
opt.incsearch = true -- use incremental search
|
||||
opt.hlsearch = true -- highlight search matches
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- cursor line
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
opt.cursorline = false -- highlight the current line
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- appearance
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
|
||||
opt.background = "dark"
|
||||
opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
|
||||
opt.scrolloff = 4 -- is one of my fav
|
||||
opt.sidescrolloff = 4 -- The minimal number of screen columns to keep
|
||||
opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
|
||||
|
||||
vim.cmd([[
|
||||
set noshowmode
|
||||
]])
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- backspace
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
opt.backspace = "indent,eol,start"
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- split windows
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- [[ Splits ]]
|
||||
opt.splitright = true -- place new window to right of current one
|
||||
opt.splitbelow = true -- place new window below the current one
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- AutoCompletion
|
||||
--
|
||||
-- set the completeopt to have a better completion experience
|
||||
-- :help completeopt
|
||||
--
|
||||
-- menuone : popup even when there's only one match
|
||||
-- noinsert : do not insert text until a selection is made
|
||||
-- noselect : do not select, force to select one from the menu
|
||||
-- shortmess : avoid showing extra messages when using completion
|
||||
-- updatetime : set updatetime for CursorHold
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
opt.completeopt = {'menuone', 'noselect', 'noinsert'}
|
||||
opt.shortmess = opt.shortmess + { c = true}
|
||||
opt.updatetime = 100
|
||||
--vim.api.nvim_set_option( 'updatetime', 300)
|
||||
|
||||
-- fixed column for diagnostic to appear
|
||||
-- show autodiagnostic popup on cursor hover_range
|
||||
-- goto previous/next diagnostic warning/error
|
||||
-- show inlay_hints more frequently
|
||||
vim.cmd([[
|
||||
set signcolumn=yes
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
-- clipboard
|
||||
-- ------------------------------------------------------------------------------------------------
|
||||
opt.clipboard:append("unnamedplus") -- allows neovim to access the system clipboard
|
||||
opt.iskeyword:append("-")
|
||||
|
||||
--vim.g.neovide_cursor_vfx_mode = ""
|
||||
--vim.g.neovide_cursor_animation_length = 0
|
||||
--vim.g.neovide_transparency = 1.0
|
||||
--vim.g.neovide_remember_window_size = true
|
||||
---- vim.g.neovide_profiler =false
|
||||
--vim.g.neovide_scroll_animation_length = 0.0
|
||||
|
||||
|
||||
--
|
||||
-- which.key options - 2026-05-28
|
||||
--
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
vim.o.mouse = ''
|
||||
Executable
+231
@@ -0,0 +1,231 @@
|
||||
local fn = vim.fn
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Automatically install packer
|
||||
-- ----------------------------------------------------------------------------
|
||||
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
PACKER_BOOTSTRAP = fn.system {
|
||||
"git",
|
||||
"clone",
|
||||
"--depth",
|
||||
"1",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
install_path,
|
||||
}
|
||||
|
||||
print "Installing packer. Close and reopen Neovim..."
|
||||
|
||||
vim.cmd [[
|
||||
packadd packer.nvim
|
||||
]]
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Autocommand that reloads neovim whenever you save the plugins.lua file
|
||||
-- ----------------------------------------------------------------------------
|
||||
vim.cmd [[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]]
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Use a protected call so we don't error out on first use
|
||||
-- ----------------------------------------------------------------------------
|
||||
local status, packer = pcall(require, "packer")
|
||||
if not status then
|
||||
return
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Have packer use a popup window
|
||||
-- ----------------------------------------------------------------------------
|
||||
packer.init {
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float { border = "rounded" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Install plugins
|
||||
-- ----------------------------------------------------------------------------
|
||||
return packer.startup(function(use)
|
||||
|
||||
-- ------------------------------------------------------
|
||||
-- Have packer manage itself
|
||||
-- ------------------------------------------------------
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
|
||||
use "lewis6991/impatient.nvim"
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- web devicons used by e.g.: nvim-tree, lualine, ...
|
||||
-- ----------------------------------------------------
|
||||
use "kyazdani42/nvim-web-devicons"
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- colorschemas
|
||||
-- ----------------------------------------------------
|
||||
use { "bluz71/vim-nightfly-colors", as = "nighfly" }
|
||||
use { "bluz71/vim-moonfly-colors", as = "moonfly" }
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- lualine (status line)
|
||||
-- ----------------------------------------------------
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
||||
config = function()
|
||||
require( "roka.plug.lualine")
|
||||
end
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- telescope
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- branch = "0.1.x",
|
||||
branch = "0.1.x",
|
||||
|
||||
requires = {
|
||||
{ "nvim-lua/plenary.nvim"},
|
||||
{ "nvim-telescope/telescope-media-files.nvim"},
|
||||
{ "nvim-telescope/telescope-fzy-native.nvim"},
|
||||
},
|
||||
|
||||
config = function()
|
||||
require( "roka.plug.telescope")
|
||||
end
|
||||
}
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- nvim-tree
|
||||
-- ----------------------------------------------------
|
||||
use {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
|
||||
config = function()
|
||||
require( "roka.plug.nvim-tree")
|
||||
end
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- autocompletion
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
||||
requires = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-calc",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
|
||||
config = function()
|
||||
require( "roka.plug.nvim-cmp")
|
||||
end
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- autocompletion/snippets
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
"L3MON4D3/LuaSnip", -- Required
|
||||
"rafamadriz/friendly-snippets", -- Optional
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- bufferline - mz
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
"akinsho/bufferline.nvim",
|
||||
tag = "*",
|
||||
requires = "nvim-tree/nvim-web-devicons",
|
||||
|
||||
|
||||
-- vim.opt.termguicolors = true
|
||||
config = function()
|
||||
-- require("bufferline").setup{}
|
||||
require("roka.plug.bufferline")
|
||||
end
|
||||
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- fzf - mz
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
"junegunn/fzf.vim",
|
||||
requires = { 'junegunn/fzf', run = ':call fzf#install()' }
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- nvim-treesitter - mz
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
branch = "master",
|
||||
run = ':TSUpdate', -- This automatically updates parsers on install/update
|
||||
}
|
||||
|
||||
-- --------------------------------------------------------------
|
||||
-- render-markdown - mz
|
||||
-- --------------------------------------------------------------
|
||||
use {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
after = { 'nvim-treesitter' },
|
||||
-- requires = { 'nvim-mini/mini.nvim', opt = true }, -- if you use the mini.nvim suite
|
||||
requires = { 'nvim-mini/mini.icons', opt = true }, -- if you use standalone mini plugins
|
||||
-- requires = { 'nvim-tree/nvim-web-devicons', opt = true }, -- if you prefer nvim-web-devicons
|
||||
config = function()
|
||||
require('render-markdown').setup({})
|
||||
end
|
||||
}
|
||||
|
||||
-- -------------------------------------------------------------
|
||||
-- which-key
|
||||
-- -------------------------------------------------------------
|
||||
use "folke/which-key.nvim"
|
||||
|
||||
-- -------------------------------------------------------------
|
||||
-- toggle-fullscreen - 2026-05-31
|
||||
-- -------------------------------------------------------------
|
||||
-- use {
|
||||
-- "propet/toggle-fullscreen.nvim",
|
||||
-- config = function()
|
||||
-- require('toggle-fullscreen').setup({})
|
||||
-- end
|
||||
-- }
|
||||
--
|
||||
-- -------------------------------------------------------------
|
||||
-- maximizer - 2026-05-31
|
||||
-- -------------------------------------------------------------
|
||||
use {
|
||||
"0x00-ketsu/maximizer.nvim",
|
||||
config = function()
|
||||
require("maximizer").setup {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
-- -------------------------------------------------------------------
|
||||
-- Automatically set up your configuration after cloning packer.nvim.
|
||||
-- Put this at the end after all plugins.
|
||||
-- -------------------------------------------------------------------
|
||||
if PACKER_BOOTSTRAP then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user