Installed tabnine

This commit is contained in:
Kristofers Solo
2023-06-14 17:40:26 +03:00
parent b6665c490e
commit 3bbf37a81b
51 changed files with 866 additions and 524 deletions

View File

@@ -1,86 +0,0 @@
local status_ok, bufferline = pcall(require, "bufferline")
if not status_ok then
return
end
bufferline.setup({
options = {
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' },
},
highlights = {
fill = {
fg = { attribute = "fg", highlight = "ff0000" },
bg = { attribute = "bg", highlight = "TabLine" },
},
background = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
buffer_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
close_button = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
close_button_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
tab_selected = {
fg = { attribute = "fg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
tab = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
tab_close = {
fg = { attribute = "fg", highlight = "TabLineSel" },
bg = { attribute = "bg", highlight = "Normal" },
},
duplicate_selected = {
fg = { attribute = "fg", highlight = "TabLineSel" },
bg = { attribute = "bg", highlight = "TabLineSel" },
italic = true,
},
duplicate_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
italic = true,
},
duplicate = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
italic = true,
},
modified = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
modified_selected = {
fg = { attribute = "fg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
modified_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
separator = {
fg = { attribute = "bg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
separator_selected = {
fg = { attribute = "bg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
indicator_selected = {
fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
bg = { attribute = "bg", highlight = "Normal" },
},
},
})

21
after/plugin/cmake.lua Normal file
View File

@@ -0,0 +1,21 @@
local status_ok, cmake = pcall(require, "cmake-tools")
if not status_ok then
return
end
cmake.setup({
cmake_command = "cmake",
cmake_build_directory = "target/build/",
cmake_build_directory_prefix = "cmake_build_", -- when cmake_build_directory is "", this option will be activated
cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" },
cmake_soft_link_compile_commands = true, -- if softlink compile commands json file
cmake_build_options = {},
cmake_console_size = 15, -- cmake output window height
cmake_console_position = "belowright", -- "belowright", "aboveleft", ...
cmake_show_console = "always", -- "always", "only_on_error"
cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional
cmake_variants_message = {
short = { show = true },
long = { show = true, max_length = 40 },
},
})

View File

@@ -57,7 +57,7 @@ cmp.setup({
{ name = "nvim_lsp" },
{ name = "path" },
{ name = "luasnip" },
{ name = "buffer", keyword_length = 1 },
{ name = "buffer" },
},
snippet = {
expand = function(args)
@@ -82,7 +82,6 @@ cmp.setup({
},
experimental = {
ghost_text = true,
native_menu = false,
},
window = {
completion = cmp.config.window.bordered(),

View File

@@ -6,14 +6,14 @@ end
colorizer.setup({
filetypes = { "html", "css", "js", "lua", "yaml", "conf", "toml" },
user_default_options = {
RGB = true, -- #RGB hex codes
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = false, -- "Name" codes like Blue or blue
RRGGBBAA = true, -- #RRGGBBAA hex codes
AARRGGBB = true, -- 0xAARRGGBB hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes for `mode`: foreground, background, virtualtext
mode = "background", -- Set the display mode.

17
after/plugin/harpoon.lua Normal file
View File

@@ -0,0 +1,17 @@
local status_ok, harpoon = pcall(require, "harpoon")
if not status_ok then
return
end
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
harpoon.setup()
local keymap = vim.keymap.set
local opts = { silent = true }
for i = 1, 12, 1 do
keymap("n", "<F" .. i .. ">", function()
ui.nav_file(i)
end)
end

View File

@@ -0,0 +1,8 @@
local status_ok, hologram = pcall(require, "hologram")
if not status_ok then
return
end
hologram.setup({
auto_display = true,
})

View File

@@ -3,40 +3,6 @@ if not status_ok then
return
end
local hide_in_width = function()
return vim.fn.winwidth(0) > 80
end
local diagnostics = {
"diagnostics",
sources = { "nvim_diagnostic" },
sections = { "error", "warn" },
symbols = { error = "", warn = "" },
colored = false,
always_visible = true,
}
local diff = {
"diff",
colored = false,
symbols = { added = "", modified = "", removed = "" }, -- changes diff symbols
cond = hide_in_width,
}
local filetype = {
"filetype",
icons_enabled = false,
}
local location = {
"location",
padding = 0,
}
local spaces = function()
return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
end
lualine.setup({
options = {
globalstatus = true,
@@ -50,9 +16,9 @@ lualine.setup({
sections = {
lualine_a = { "mode" },
lualine_b = { "branch" },
lualine_c = { diagnostics },
lualine_x = { diff, "encoding", filetype },
lualine_y = { location },
lualine_z = { "progress" },
lualine_c = { "diff" },
lualine_x = { "diagnostics" },
lualine_y = { "filename" },
lualine_z = { "location", "progress" },
},
})

View File

@@ -112,13 +112,13 @@ ls.add_snippets(nil, {
fmt(
[[
#[cfg(test)]
mod test {{
mod tests {{
{}
{}
}}
]],
{
c(1, { t(" use super::*"), t("") }),
c(1, { t(" use super::*;"), t("") }),
i(0),
}
)
@@ -127,13 +127,13 @@ ls.add_snippets(nil, {
python = {},
cpp = {
s(
"copy",
"auth",
fmt(
[[
// Copyright {}
// Author - Kristiāns Francis Cagulis, kc22015
// {}
// Programma izveidota: {}
// Created: {}
]],
{
get_year(),
@@ -147,7 +147,7 @@ ls.add_snippets(nil, {
fmt(
[[
// {};
// funkcija {}({}) -
// Funkcija {}({}) -
// {}
{} {{
}}
@@ -170,5 +170,48 @@ ls.add_snippets(nil, {
}
)
),
s(
"templ",
fmt(
[[
template <class {}>
{}({}){{
{}
}}
]],
{
c(1, { t("T"), t("T1, class T2") }),
i(2),
i(3),
i(0),
}
)
),
},
norg = {
s(
"meta",
fmt(
[[
@document.meta
title: {}
author: {}
categories: {}
@end
]],
{
i(1),
c(
2,
{
t("Kristofers Solo"),
t("Kristiāns Francis Cagulis, kc22015"),
t("Kristiāns Francis Cagulis"),
}
),
i(0),
}
)
),
},
})

124
after/plugin/oil.lua Normal file
View File

@@ -0,0 +1,124 @@
local status_ok, oil = pcall(require, "oil")
if not status_ok then
return
end
oil.setup({
-- Id is automatically added at the beginning, and name at the end
-- See :help oil-columns
columns = {
"icon",
-- "permissions",
-- "size",
-- "mtime",
},
-- Buffer-local options to use for oil buffers
buf_options = {
buflisted = false,
bufhidden = "hide",
},
-- Window-local options to use for oil buffers
win_options = {
wrap = false,
signcolumn = "no",
cursorcolumn = false,
foldcolumn = "0",
spell = false,
list = false,
conceallevel = 3,
concealcursor = "n",
},
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`
default_file_explorer = true,
-- Restore window options to previous values when leaving an oil buffer
restore_win_options = true,
-- Skip the confirmation popup for simple operations
skip_confirm_for_simple_edits = false,
-- Deleted files will be removed with the `trash-put` command.
delete_to_trash = true,
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
prompt_save_on_select_new_entry = true,
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", nowait = true })
-- Additionally, if it is a string that matches "actions.<name>",
-- it will use the mapping at require("oil.actions").<name>
-- Set to `false` to remove a keymap
-- See :help oil-actions for a list of all available actions
keymaps = {
["?"] = "actions.show_help",
["<CR>"] = "actions.select",
["<C-L>"] = "actions.select_vsplit",
["C-J>"] = "actions.select_split",
["<C-t>"] = "actions.select_tab",
["<C-p>"] = "actions.preview",
["<C-c>"] = "actions.close",
["<C-r>"] = "actions.refresh",
["-"] = "actions.parent",
["_"] = "actions.open_cwd",
["`"] = "actions.cd",
["~"] = "actions.tcd",
["."] = "actions.toggle_hidden",
},
-- Set to false to disable all of the above keymaps
use_default_keymaps = true,
view_options = {
-- Show files and directories that start with "."
show_hidden = true,
-- This function defines what is considered a "hidden" file
is_hidden_file = function(name, bufnr)
return vim.startswith(name, ".")
end,
-- This function defines what will never be shown, even when `show_hidden` is set
is_always_hidden = function(name, bufnr)
return false
end,
},
-- Configuration for the floating window in oil.open_float
float = {
-- Padding around the floating window
padding = 2,
max_width = 0,
max_height = 0,
border = "rounded",
win_options = {
winblend = 10,
},
},
-- Configuration for the actions floating preview window
preview = {
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_width and max_width can be a single value or a list of mixed integer/float types.
-- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
max_width = 0.9,
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
min_width = { 40, 0.4 },
-- optionally define an integer/float for the exact width of the preview window
width = nil,
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_height and max_height can be a single value or a list of mixed integer/float types.
-- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
max_height = 0.9,
-- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
min_height = { 5, 0.1 },
-- optionally define an integer/float for the exact height of the preview window
height = nil,
border = "rounded",
win_options = {
winblend = 0,
},
},
-- Configuration for the floating progress window
progress = {
max_width = 0.9,
min_width = { 40, 0.4 },
width = nil,
max_height = { 10, 0.9 },
min_height = { 5, 0.1 },
height = nil,
border = "rounded",
minimized_border = "none",
win_options = {
winblend = 0,
},
},
})

View File

@@ -6,7 +6,7 @@ project.setup({
-- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project
detection_methods = { "pattern" },
-- patterns used to detect root dir, when **"pattern"** is in detection_methods
patterns = { ".git", "Makefile", "package.json", ".venv", "Cargo.toml", "requirements.txt" },
patterns = { ".git", "package.json", ".venv", "Cargo.toml", "requirements.txt", "CMakeLists.txt" },
})
local tele_status_ok, telescope = pcall(require, "telescope")

14
after/plugin/tabnine.lua Normal file
View File

@@ -0,0 +1,14 @@
local status_ok, tabnine = pcall(require, "tabnine")
if not status_ok then
return
end
tabnine.setup({
disable_auto_comment = true,
accept_keymap = "<Tab>",
dismiss_keymap = "<C-c>",
debounce_ms = 800,
suggestion_color = { gui = "#808080", cterm = 244 },
exclude_filetypes = { "TelescopePrompt" },
log_file_path = nil, -- absolute path to Tabnine log file,
})

View File

@@ -7,10 +7,20 @@ local actions = require("telescope.actions")
telescope.setup({
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
"--hidden",
},
prompt_prefix = "",
selection_caret = "",
path_display = { "smart" },
file_ignore_patterns = { ".git/", "node_modules" },
file_ignore_patterns = { ".git/", "node_modules", ".venv/" },
mappings = {
i = {
["<Down>"] = actions.cycle_history_next,
@@ -20,6 +30,12 @@ telescope.setup({
},
},
},
pickers = {
find_files = {
hidden = true,
follow = true,
},
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
@@ -44,9 +60,30 @@ telescope.setup({
-- vim.api.nvim_put({ emoji.value }, 'c', false, true)
end,
},
["ui-select"] = {
require("telescope.themes").get_dropdown({
-- even more opts
}),
-- pseudo code / specification for writing custom displays, like the one
-- for "codeactions"
-- specific_opts = {
-- [kind] = {
-- make_indexed = function(items) -> indexed_items, width,
-- make_displayer = function(widths) -> displayer
-- make_display = function(displayer) -> function(e)
-- make_ordinal = function(e) -> string
-- },
-- -- for example to disable the custom builtin "codeactions" display
-- do the following
-- codeactions = false,
-- }
},
},
})
telescope.load_extension("fzf")
telescope.load_extension("media_files")
telescope.load_extension("emoji")
telescope.load_extension("ui-select")
telescope.load_extension("color_names")

View File

@@ -1,12 +0,0 @@
vim.g.vimwiki_list = {
{
path = "~/vimwiki",
syntax = "markdown",
ext = ".md",
},
}
vim.g.vimwiki_ext2syntax = {
[".md"] = "markdown",
[".markdown"] = "markdown",
[".mdown"] = "markdown",
}

View File

@@ -95,9 +95,8 @@ local mappings = {
[";"] = { vim.cmd.Alpha, "Dashboard" },
["/"] = { "<Plug>(comment_toggle_linewise_current)", "Comment toggle current line" },
c = { vim.cmd.Bdelete, "Close Buffer" },
h = { "<cmd>nohlsearch<cr>", "No Highlight" },
f = {
"<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>",
"<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown({previewer = false}))<cr>",
"Find files",
},
e = { vim.cmd.NvimTreeToggle, "Explorer" },
@@ -105,61 +104,14 @@ local mappings = {
P = { "<cmd>lua require('telescope').extensions.projects.projects()<cr>", "Projects" },
b = { "<cmd>Telescope buffers<cr>", "Find Buffers" },
u = { vim.cmd.UndotreeToggle, "UndotreeToggle" },
x = { "<cmd>!chmod +x %<cr>", "Make executable" },
B = {
name = "Buffers",
j = { "<cmd>BufferLinePick<cr>", "Jump" },
f = { "<cmd>Telescope buffers<cr>", "Find" },
b = { "<cmd>BufferLineCyclePrev<cr>", "Previous" },
n = { "<cmd>BufferLineCycleNext<cr>", "Next" },
-- w = { "<cmd>BufferWipeout<cr>", "Wipeout" }, -- TODO: implement this for bufferline
e = {
"<cmd>BufferLinePickClose<cr>",
"Pick which buffer to close",
},
h = { "<cmd>BufferLineCloseLeft<cr>", "Close all to the left" },
l = {
"<cmd>BufferLineCloseRight<cr>",
"Close all to the right",
},
D = {
"<cmd>BufferLineSortByDirectory<cr>",
"Sort by directory",
},
L = {
"<cmd>BufferLineSortByExtension<cr>",
"Sort by language",
},
},
p = {
name = "Packer",
c = { "<cmd>PackerCompile<cr>", "Compile" },
i = { "<cmd>PackerInstall<cr>", "Install" },
s = { "<cmd>PackerSync<cr>", "Sync" },
S = { "<cmd>PackerStatus<cr>", "Status" },
u = { "<cmd>PackerUpdate<cr>", "Update" },
},
t = { vim.cmd.TagbarToggle, "Toggle Tagbar" },
m = { require("harpoon.mark").add_file, "Add file to harpoon" },
h = { require("harpoon.ui").toggle_quick_menu, "Add file to harpoon" },
n = { vim.cmd.Oil, "Open Oil" },
g = {
name = "Git",
g = { "<cmd>lua _LAZYGIT_TOGGLE()<cr>", "Lazygit" },
j = { "<cmd>lua require('gitsigns').next_hunk()<cr>", "Next Hunk" },
k = { "<cmd>lua require('gitsigns').prev_hunk()<cr>", "Prev Hunk" },
l = { "<cmd>lua require('gitsigns').blame_line()<cr>", "Blame" },
p = { "<cmd>lua require('gitsigns').preview_hunk()<cr>", "Preview Hunk" },
r = { "<cmd>lua require('gitsigns').reset_hunk()<cr>", "Reset Hunk" },
R = { "<cmd>lua require('gitsigns').reset_buffer()<cr>", "Reset Buffer" },
s = { "<cmd>lua require('gitsigns').stage_hunk()<cr>", "Stage Hunk" },
u = {
"<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>",
"Undo Stage Hunk",
},
o = { "<cmd>Telescope git_status<cr>", "Open changed file" },
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
c = { "<cmd>Telescope git_commits<cr>", "Checkout commit" },
d = {
"<cmd>Gitsigns diffthis HEAD<cr>",
"Git Diff",
},
},
l = {
name = "LSP",
@@ -169,18 +121,11 @@ local mappings = {
"<cmd>Telescope diagnostics<cr>",
"Workspace Diagnostics",
},
f = { "<cmd>lua vim.lsp.buf.format({ async = true })<cr>", "Format" },
i = { "<cmd>LspInfo<cr>", "Info" },
j = {
"<cmd>lua vim.diagnostic.goto_next()<cr>",
"Next Diagnostic",
},
j = { "<cmd>lua vim.diagnostic.goto_next()<cr>", "Next Diagnostic" },
k = {
"<cmd>lua vim.diagnostic.goto_prev()<cr>",
"Prev Diagnostic",
},
l = { "<cmd>lua vim.lsp.codelens.run()<cr>", "CodeLens Action" },
q = { "<cmd>lua vim.lsp.diagnostic.set_loclist()<cr>", "Quickfix" },
r = { "<cmd>lua vim.lsp.buf.rename()<cr>", "Rename" },
s = { "<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols" },
S = {
@@ -190,12 +135,13 @@ local mappings = {
e = { "<cmd>Telescope quickfix<cr>", "Telescope Quickfix" },
R = {
name = "Rust",
e = { "<cmd>RustExpandMacro<cr>", "Expand macro" },
c = { "<cmd>RustOpenCargo<cr>", "Open cargo.toml" },
p = { "<cmd>RustParentModule<cr>", "Parent module" },
h = { "<cmd>RustHoverActions<cr>", "Hover actions" },
g = { "<cmd>RustViewCrateGraph<cr>", "View create graph" },
d = { "<cmd>RustOpenExternalDocs<cr>", "Open external docs" },
e = { vim.cmd.RustExpandMacro, "Expand macro" },
c = { vim.cmd.RustOpenCargo, "Open cargo.toml" },
p = { vim.cmd.RustParentModule, "Parent module" },
h = { vim.cmd.RustHoverActions, "Hover actions" },
g = { vim.cmd.RustViewCrateGraph, "View create graph" },
d = { vim.cmd.RustOpenExternalDocs, "Open external docs" },
R = { vim.cmd.RustRunnables, "Open runnables" },
},
},
s = {
@@ -218,29 +164,17 @@ local mappings = {
"Colorscheme with Preview",
},
},
t = {
name = "Terminal",
n = { "<cmd>lua _NODE_TOGGLE()<cr>", "Node" },
u = { "<cmd>lua _NCDU_TOGGLE()<cr>", "NCDU" },
b = { "<cmd>lua _BTOP_TOGGLE()<cr>", "Btop" },
p = { "<cmd>lua _PYTHON_TOGGLE()<cr>", "Python" },
c = { "<cmd>lua _CARGO_RUN()<cr>", "Cargo run" },
f = { "<cmd>ToggleTerm direction=float<cr>", "Float" },
h = { "<cmd>ToggleTerm size=10 direction=horizontal<cr>", "Horizontal" },
v = { "<cmd>ToggleTerm size=80 direction=vertical<cr>", "Vertical" },
},
w = {
name = "Vimwiki",
w = { "<Plug>VimwikiIndex", "Open index file" },
t = { "<Plug>VimwikiTabIndex", "Open index file in new tab" },
s = { "<Plug>VimwikiUISelect", "Display list of wikis" },
i = { "<Plug>VimwikiDiaryIndex", "Open diary index" },
h = { "<Plug>Vimwiki2HTML", "Convert file to HTML" },
H = { "<Plug>Vimwiki2HTMLBrowse", "Convert file to HTML and open in browser" },
n = { "<Plug>VimwikiGoto", "Goto link provided by an argument" },
d = { "<Plug>VimwikiDeleteFile", "Rename file" },
r = { "<Plug>VimwikiRenameFile", "Delete file" },
},
-- T = {
-- name = "Terminal",
-- n = { "<cmd>lua _NODE_TOGGLE()<cr>", "Node" },
-- u = { "<cmd>lua _NCDU_TOGGLE()<cr>", "NCDU" },
-- b = { "<cmd>lua _BTOP_TOGGLE()<cr>", "Btop" },
-- p = { "<cmd>lua _PYTHON_TOGGLE()<cr>", "Python" },
-- c = { "<cmd>lua _CARGO_RUN()<cr>", "Cargo run" },
-- f = { "<cmd>ToggleTerm direction=float<cr>", "Float" },
-- h = { "<cmd>ToggleTerm size=10 direction=horizontal<cr>", "Horizontal" },
-- v = { "<cmd>ToggleTerm size=80 direction=vertical<cr>", "Vertical" },
-- },
L = {
name = "Language settings",
c = { "<cmd>setlocal formatoptions-=cro<cr>", "Disable autocomment" },
@@ -259,15 +193,21 @@ local mappings = {
i = { "<cmd>lua require('dap').step_into()<cr>", "Step into code" },
o = { "<cmd>lua require('dap').step_over()<cr>", "Step over code" },
O = { "<cmd>lua require('dap').step_out()<cr>", "Step out of code" },
r = { "<cmd>lua require('dap).repl.open()<cr>", "Inspect state" },
r = { "<cmd>lua require('dap').repl.open()<cr>", "Inspect state" },
T = { "<cmd>lua require('dap').terminate()<cr>", "Terminate" },
l = { "<cmd>lua require('dap').run_last()<cr>", "Run last" },
},
q = {
name = "Persistence",
s = { "<cmd>lua require('persistence').load()<cr>", "Current directory" },
l = { "<cmd>lua require('persistence').load({ last = true })<cr>", "Last session" },
d = { "<cmd>lua require('persistence').stop()<cr>", "Stop" },
w = {
name = "VimWiki",
w = { "<Plug>VimwikiIndex", "Open index file" },
t = { "<Plug>VimwikiTabIndex", "Open index file in new tab" },
s = { "<Plug>VimwikiUISelect", "Display list of wikis" },
i = { "<Plug>VimwikiDiaryIndex", "Open diary index" },
h = { "<Plug>Vimwiki2HTML", "Convert file to HTML" },
H = { "<Plug>Vimwiki2HTMLBrowse", "Convert file to HTML and open in browser" },
n = { "<Plug>VimwikiGoto", "Goto link provided by an argument" },
d = { "<Plug>VimwikiDeleteFile", "Rename file" },
r = { "<Plug>VimwikiRenameFile", "Delete file" },
},
}

65
after/plugin/zen.lua Normal file
View File

@@ -0,0 +1,65 @@
local status_ok, zen_mode = pcall(require, "zen-mode")
if not status_ok then
return
end
zen_mode.setup({
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 120, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
signcolumn = "no", -- disable signcolumn
-- number = false, -- disable number column
-- relativenumber = false, -- disable relative numbers
cursorline = false, -- disable cursorline
cursorcolumn = false, -- disable cursor column
foldcolumn = "0", -- disable fold column
list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = false,
font = "+4", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = false,
font = "14", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = false,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
},
-- callback where you can add custom code when the Zen window opens
on_open = function(win) end,
-- callback where you can add custom code when the Zen window closes
on_close = function() end,
})