First release
This commit is contained in:
Executable
+3
@@ -0,0 +1,3 @@
|
||||
vim.opt.termguicolors = true
|
||||
require("bufferline").setup{}
|
||||
|
||||
Executable
+26
@@ -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]]
|
||||
Executable
+101
@@ -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",
|
||||
-- },
|
||||
-- }
|
||||
}
|
||||
Executable
+33
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Executable
+165
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
Executable
+34
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Executable
+113
@@ -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
|
||||
},
|
||||
}
|
||||
Executable
+25
@@ -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,
|
||||
},
|
||||
}
|
||||
Executable
+44
@@ -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 = ''
|
||||
Reference in New Issue
Block a user