First release

This commit is contained in:
Mészáros Zoltán
2026-06-16 12:27:51 +02:00
commit f750e44e1a
19 changed files with 1285 additions and 0 deletions
Executable
+4
View File
@@ -0,0 +1,4 @@
*~
/plugin
/doc/neovim/.obsidian
+9
View File
@@ -0,0 +1,9 @@
| Environment variable | Path |
| :- | :- |
|XDG_CONFIG_HOME| z:\\home\\.config|
|XDG_DATA_HOME|z:\\home\\.data|
### Folder structure
~/.config/nvim
View File
+105
View File
@@ -0,0 +1,105 @@
## 2.1 - Font
The font we use in neovim is one from the [nerd]() font collection. Those fonts contain special characters used as an icon in NeoVim. "SauceCodePro NF" is a derivation of the "SourceCodePro" font.
`lua/roka/core/options.lua`
```lua
vim.opt.guifont = { "SauceCodePro NF:h11:#e-subpixelantialias:#h-none" }
```
## 2.2 - Icons
The various icons can be used by many plugins, example _nvim-tree_ or _lualine_.
`lua/roka/core/plugins.lua`
```lua
return require('packer').startup(function()
-- other plugins...
use "kyazdani42/nvim-web-devicons"
-- other plugins...
end)
```
## 2.3 - Color-scheme
`lua/roka/core/plugins.lua`
```lua
return require('packer').startup(function()
-- other plugins...
use { "bluz71/vim-nightfly-colors", as = "nighfly" }
use { "bluz71/vim-moonfly-colors", as = "moonfly" }
-- other plugins...
end)
```
`lua/roka/plug/color.lua`
`init.lua`
```lua
-- other requires
require( "roka.plug.color")
-- other requires
```
## 2.4 - LuaLine
`lua/roka/core/plugins.lua`
```lua
return require('packer').startup(function()
-- other plugins...
use "nvim-lualine/lualine.nvim"
-- other plugins...
end)
```
`lua/roka/plug/lualine.lua`
```lua
local status, lualine = pcall( require, "lualine")
if not status then
return
end
local lualine_nightfly = require("lualine.themes.nightfly")
local new_colors = {
blue = "#65D1FF",
green = "#3EFFDC",
violet = "#FF61EF",
yellow = "#FFDA7B",
black = "#000000",
}
lualine_nightfly.normal.a.bg = new_colors.blue
lualine_nightfly.insert.a.bg = new_colors.green
lualine_nightfly.visual.a.bg = new_colors.violet
lualine_nightfly.command = {
a = {
gui = "bold",
bg = new_colors.yellow,
fg = new_colors.black,
},
}
lualine.setup({
options = {
theme = lualine_nightfly
}
})
```
`init.lua`
```lua
-- other requires
require( "roka.plug.lualine")
-- other requires
```
+136
View File
@@ -0,0 +1,136 @@
`lua/roka/core/plugins.lua`
```lua
return require('packer').startup(function()
-- other plugins...
use "nvim-telescope/telescope.nvim"
-- other plugins...
end)
```
`lua/roka/plug/telescope.lua`
```lua
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end
telescope.load_extension('media_files')
local actions = require "telescope.actions"
telescope.setup {
defaults = {
prompt_prefix = "",
selection_caret = "",
path_display = { "smart" },
-- The minimal init not showing preview by default is likely due to the default
-- preview_cutoff value of 120 columns. It looks like your terminal is smaller than 120 columns.
-- Set cutoff to zero to show the preview anyway
layout_config = {
horizontal = {
preview_cutoff = 0,
},
},
mappings = {
i = {
["<C-n>" ] = actions.cycle_history_next,
["<C-p>" ] = actions.cycle_history_prev,
["<C-j>" ] = actions.move_selection_next,
["<C-k>" ] = actions.move_selection_previous,
["<C-c>" ] = actions.close,
["<Down>"] = actions.move_selection_next,
["<Up>" ] = actions.move_selection_previous,
["<CR>" ] = actions.select_default,
["<C-x>" ] = actions.select_horizontal,
["<C-v>" ] = actions.select_vertical,
["<C-t>" ] = actions.select_tab,
["<C-u>" ] = actions.preview_scrolling_up,
["<C-d>" ] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<C-l>"] = actions.complete_tag,
["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
},
n = {
["<esc>" ] = actions.close,
["<CR>" ] = actions.select_default,
["<C-x>" ] = actions.select_horizontal,
["<C-v>" ] = actions.select_vertical,
["<C-t>" ] = actions.select_tab,
["<Tab>" ] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>" ] = actions.send_to_qflist + actions.open_qflist,
["<M-q>" ] = actions.send_selected_to_qflist + actions.open_qflist,
["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous,
["H"] = actions.move_to_top,
["M"] = actions.move_to_middle,
["L"] = actions.move_to_bottom,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["?"] = actions.which_key,
},
},
},
-- pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
-- },
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "rg" -- find command (defaults to `fd`)
}
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
},
}
```
`init.lua`
```lua
-- other requires
require( "roka.plug.telescope")
-- other requires
```
Executable
+7
View File
@@ -0,0 +1,7 @@
require( "roka.core.options")
require( "roka.core.keymaps")
require( "roka.core.plugins")
require( "roka.plug.color" )
+122
View File
@@ -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>")
+121
View File
@@ -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 = ''
+231
View File
@@ -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)
+3
View File
@@ -0,0 +1,3 @@
vim.opt.termguicolors = true
require("bufferline").setup{}
+26
View File
@@ -0,0 +1,26 @@
local colorscheme = "moonfly"
local custom_highlight =
vim.api.nvim_create_augroup( "CustomHighlight", {})
vim.api.nvim_create_autocmd( "ColorScheme", {
pattern = "nightfly",
callback = function()
vim.api.nvim_set_hl( 0, "String", { fg = "#00A000", italic = false })
vim.api.nvim_set_hl( 0, "Comment", { fg = "#808080", italic = false })
vim.api.nvim_set_hl( 0, "Function", { fg = "#82aaff", italic = false })
vim.api.nvim_set_hl( 0, "CursorLineNr", { fg = "#82aaff", italic = false })
vim.api.nvim_set_hl( 0, "Delimiter", { fg = "#ff0000", italic = false })
end,
group = custom_highlight,
})
local status, _ = pcall( vim.cmd, "colorscheme " .. colorscheme)
if not status then
vim.notify( "Colorscheme " .. colorscheme .. " is not found!")
return
end
vim.cmd [[ set cursorline]]
vim.cmd [[ highlight clear CursorLine]]
+101
View File
@@ -0,0 +1,101 @@
return {
"ibhagwan/fzf-lua",
-- optional for icon support
-- dependencies = { "nvim-tree/nvim-web-devicons" },
-- or if using mini.icons/mini.nvim
dependencies = { "echasnovski/mini.icons" },
opts = {},
keys={
{
"<leader>ff",
function() require('fzf-lua').files() end,
desc="Find Files in project directory"
},
{
"<leader>fc",
function() require('fzf-lua').files({cwd='~/.config'}) end,
desc="Find Files in config directory"
}
}
-- {
-- "<leader>fg",
-- function() require('fzf-lua').live_grep() end,
-- desc="Find by grepping in project directory"
-- },
-- {
-- "<leader>fc",
-- function() require('fzf-lua').files({cwd=vim.fn.stdpath("config")}) end,
-- desc="Find in neovim configuration"
-- },
-- {
-- "<leader>fh",
-- function()
-- require("fzf-lua").helptags()
-- end,
-- desc = "[F]ind [H]elp",
-- },
-- {
-- "<leader>fk",
-- function()
-- require("fzf-lua").keymaps()
-- end,
-- desc = "[F]ind [K]eymaps",
-- },
-- {
-- "<leader>fb",
-- function()
-- require("fzf-lua").builtin()
-- end,
-- desc = "[F]ind [B]uiltin FZF",
-- },
-- {
-- "<leader>fw",
-- function()
-- require("fzf-lua").grep_cword()
-- end,
-- desc = "[F]ind current [W]ord",
-- },
-- {
-- "<leader>fW",
-- function()
-- require("fzf-lua").grep_cWORD()
-- end,
-- desc = "[F]ind current [W]ORD",
-- },
-- {
-- "<leader>fd",
-- function()
-- require("fzf-lua").diagnostics_document()
-- end,
-- desc = "[F]ind [D]iagnostics",
-- },
-- {
-- "<leader>fr",
-- function()
-- require("fzf-lua").resume()
-- end,
-- desc = "[F]ind [R]esume",
-- },
-- {
-- "<leader>fo",
-- function()
-- require("fzf-lua").oldfiles()
-- end,
-- desc = "[F]ind [O]ld Files",
-- },
-- {
-- "<leader><leader>",
-- function()
-- require("fzf-lua").buffers()
-- end,
-- desc = "[,] Find existing buffers",
-- },
-- {
-- "<leader>/",
-- function()
-- require("fzf-lua").lgrep_curbuf()
-- end,
-- desc = "[/] Live grep the current buffer",
-- },
-- }
}
+33
View File
@@ -0,0 +1,33 @@
local status, lualine = pcall( require, "lualine")
if not status then
return
end
local lualine_nightfly = require("lualine.themes.nightfly")
local new_colors = {
blue = "#65D1FF",
green = "#3EFFDC",
violet = "#FF61EF",
yellow = "#FFDA7B",
black = "#000000",
}
lualine_nightfly.normal.a.bg = new_colors.blue
lualine_nightfly.insert.a.bg = new_colors.green
lualine_nightfly.visual.a.bg = new_colors.violet
lualine_nightfly.command = {
a = {
gui = "bold",
bg = new_colors.yellow,
fg = new_colors.black,
},
}
lualine.setup({
options = {
theme = lualine_nightfly
}
})
+165
View File
@@ -0,0 +1,165 @@
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
local snip_status_ok, luasnip = pcall(require, "luasnip")
if not snip_status_ok then
return
end
require("luasnip/loaders/from_vscode").lazy_load()
local check_backspace = function()
local col = vim.fn.col "." - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
--   פּ ﯟ   some other good icons
local kind_icons = {
Text = "",
Method = "m",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
-- find more here: https://www.nerdfonts.com/cheat-sheet
cmp.setup {
preselect = cmp.PreselectMode.None,
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
["<C-e>"] = cmp.mapping {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
},
-- Accept currently selected item. If none selected, `select` first item.
-- Set `select` to `false` to only confirm explicitly selected items.
["<CR>"] = cmp.mapping.confirm { select = true },
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif check_backspace() then
fallback()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
},
-- ------------------------------------------------------------------------
-- formatting
-- ------------------------------------------------------------------------
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
-- Kind icons
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
vim_item.menu = ({
nvim_lsp = "[LSP]",
nvim_lua = "[Lua]",
luasnip = "[Snippet]",
buffer = "[Buffer]",
path = "[Path]",
})[entry.source.name]
return vim_item
end,
},
-- -----------------------------------------------------------------------------
-- sources
-- -----------------------------------------------------------------------------
-- 'buffer' - current buffer
-- 'path' - file paths
-- 'nvim_lua' - complete neovim's Lua runtime such vim.lsp.*
-- 'nvim_lsp' - from language server
-- 'nvim_lsp_signature_help' - display function signatures with current
-- parameter emphasized
-- 'vsnip' - nvim-cmp for vim-vsnip
-- ------------------------------------------------------------------------
sources = {
{ name = "path" },
{ name = "buffer" },
{ name = "nvim_lua" },
{ name = "nvim_lsp" },
-- { name = "nvim_lsp_signature_help" },
{ name = "luasnip" },
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
window = {
documentation = cmp.config.window.bordered(),
},
experimental = {
ghost_text = true,
native_menu = false,
},
}
+34
View File
@@ -0,0 +1,34 @@
local setup, nvimtree = pcall( require, "nvim-tree")
if not setup then
return
end
-- recommended settings from nvim-tree documentation
vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1
vim.cmd( [[ highlight NvimTreeIndentMarker guifg = #3FC5FF ]])
nvimtree.setup({
renderer = {
icons = {
glyphs = {
folder = {
arrow_closed = "",
arrow_open = "",
},
},
},
},
-- disable window_picker for explorer
-- to work well with window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
})
+113
View File
@@ -0,0 +1,113 @@
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end
telescope.load_extension('media_files')
local actions = require "telescope.actions"
telescope.setup {
defaults = {
prompt_prefix = "",
selection_caret = "",
path_display = { "smart" },
-- The minimal init not showing preview by default is likely due to the default
-- preview_cutoff value of 120 columns. It looks like your terminal is smaller than 120 columns.
-- Set cutoff to zero to show the preview anyway
layout_config = {
horizontal = {
preview_cutoff = 0,
},
},
mappings = {
i = {
["<C-n>"] = actions.cycle_history_next,
["<C-p>"] = actions.cycle_history_prev,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-c>"] = actions.close,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<C-l>"] = actions.complete_tag,
["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
},
n = {
["<esc>"] = actions.close,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous,
["H"] = actions.move_to_top,
["M"] = actions.move_to_middle,
["L"] = actions.move_to_bottom,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["?"] = actions.which_key,
},
},
},
-- pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
-- },
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "rg" -- find command (defaults to `fd`)
}
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
},
}
+25
View File
@@ -0,0 +1,25 @@
require('nvim-treesitter.configs').setup {
-- A list of parser names, or "all"
ensure_installed = {
"lua", "vim", "vimdoc", "query",
"javascript", "typescript", "tsx",
"python", "rust", "go", "c", "cpp",
"pascal", "latex", "yaml",
-- add more as needed
},
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
auto_install = true,
highlight = {
enable = true, -- false will disable the whole extension
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
},
}
+44
View File
@@ -0,0 +1,44 @@
require("which-key").setup {
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
spelling = {
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
suggestions = 20, -- how many suggestions should be shown in the list?
},
presets = {
operators = true, -- adds help for operators like d, y, ...
motions = true, -- adds help for motions
text_objects = true, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = true, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true, -- bindings for prefixed with g
},
},
operators = { gc = "Comments" },
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+", -- symbol prepended to a group
},
popup_mappings = {
scroll_down = "<c-d>", -- binding to scroll down inside the popup
scroll_up = "<c-u>", -- binding to scroll up inside the popup
},
window = {
border = "none", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size.
padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left]
winblend = 0, -- value between 0-100 0 for fully opaque and 100 for fully transparent
zindex = 1000, -- positive value to position WhichKey above other floating windows.
},
}
-- which-key
-- vim.o.timeout = true
-- vim.o.timeoutlen = 300
-- vim.o.mouse = ''
Executable
+6
View File
@@ -0,0 +1,6 @@
# Important !!!
after switching to another branch, the following folders must be deleted
- delete `%XDG_CACHE_HOME%\nvim` folder
- delete `%XDG_CONFIG_HOME%\nvim\plugin` folder
- delete `%XDG_DATA_HOME%\nvim-data` folder