Nvim: add all after/ files

This commit is contained in:
Robert Kmieć
2022-06-29 22:13:40 +02:00
parent 0353364e97
commit bd3af29f38
15 changed files with 295 additions and 0 deletions

View File

@@ -0,0 +1 @@
require('Comment').setup()

View File

@@ -0,0 +1 @@
require('crates').setup()

View File

@@ -0,0 +1 @@
inoremap <C-k><C-k> <Cmd>lua require'betterdigraphs'.digraphs("i")<CR>

View File

@@ -0,0 +1,116 @@
require('dressing').setup({
input = {
-- Set to false to disable the vim.ui.input implementation
enabled = true,
-- Default prompt string
default_prompt = "",
-- When true, <Esc> will close the modal
insert_only = true,
-- These are passed to nvim_open_win
anchor = "SW",
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "cursor",
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
prefer_width = 40,
width = nil,
-- min_width and max_width can be a list of mixed types.
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
max_width = { 140, 0.9 },
min_width = { 20, 0.2 },
-- Window transparency (0-100)
winblend = 10,
-- Change default highlight groups (see :help winhl)
winhighlight = "",
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
-- see :help dressing_get_config
get_config = nil,
},
select = {
-- Set to false to disable the vim.ui.select implementation
enabled = true,
-- Priority list of preferred vim.select implementations
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
-- Options for telescope selector
-- These are passed into the telescope picker directly. Can be used like:
-- telescope = require('telescope.themes').get_ivy({...})
-- telescope = require('telescope.themes').get_dropdown({}),
-- Options for fzf selector
fzf = {
window = {
width = 0.5,
height = 0.4,
},
},
-- Options for fzf_lua selector
fzf_lua = {
winopts = {
width = 0.5,
height = 0.4,
},
},
-- Options for nui Menu
nui = {
position = "50%",
size = nil,
relative = "editor",
border = {
style = "rounded",
},
max_width = 80,
max_height = 40,
},
-- Options for built-in selector
builtin = {
-- These are passed to nvim_open_win
anchor = "NW",
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "editor",
-- Window transparency (0-100)
winblend = 10,
-- Change default highlight groups (see :help winhl)
winhighlight = "",
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- the min_ and max_ options can be a list of mixed types.
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
width = nil,
max_width = { 140, 0.8 },
min_width = { 40, 0.2 },
height = nil,
max_height = 0.9,
min_height = { 10, 0.2 },
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
},
-- Used to override format_item. See :help dressing-format
format_item_override = {},
-- see :help dressing_get_config
get_config = nil,
},
})

View File

@@ -0,0 +1,45 @@
require'FTerm'.setup({
-- Filetype of the terminal buffer
ft = 'FTerm',
-- Command to run inside the terminal. It could be a `string` or `table`
cmd = os.getenv('SHELL'),
-- Neovim's native window border. See `:h nvim_open_win` for more configuration options.
border = 'double',
-- Close the terminal as soon as shell/command exits.
-- Disabling this will mimic the native terminal behaviour.
auto_close = true,
-- Highlight group for the terminal. See `:h winhl`
hl = 'Normal',
-- Transparency of the floating window. See `:h winblend`
blend = 0,
-- Object containing the terminal window dimensions.
-- The value for each field should be between `0` and `1`
dimensions = {
height = 0.8, -- Height of the terminal window
width = 0.8, -- Width of the terminal window
x = 0.5, -- X axis of the terminal window
y = 0.5, -- Y axis of the terminal window
},
-- Callback invoked when the terminal exits.
-- See `:h jobstart-options`
on_exit = nil,
-- Callback invoked when the terminal emits stdout data.
-- See `:h jobstart-options`
on_stdout = nil,
-- Callback invoked when the terminal emits stderr data.
-- See `:h jobstart-options`
on_stderr = nil,
})
-- Example keybindings
vim.keymap.set('n', '<leader>i', '<CMD>lua require("FTerm").toggle()<CR>')
vim.keymap.set('t', '<leader>i', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>')

View File

@@ -0,0 +1,5 @@
require("icon-picker")
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "<leader>o", "<cmd>PickIcons<cr>", opts)

View File

@@ -0,0 +1,22 @@
require("indent_blankline").setup {
char = "",
show_current_context = true,
--show_current_context_start = true,
space_char_blankline = " ",
char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
"IndentBlanklineIndent3",
"IndentBlanklineIndent4",
"IndentBlanklineIndent5",
"IndentBlanklineIndent6",
},
space_char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
"IndentBlanklineIndent3",
"IndentBlanklineIndent4",
"IndentBlanklineIndent5",
"IndentBlanklineIndent6",
},
}

View File

@@ -0,0 +1,29 @@
local gknapsettings = {
htmloutputext = "html",
htmltohtml = "touch %outputfile%",
htmltohtmlviewerlaunch = "google-chrome-beta %outputfile%",
htmltohtmlviewerrefresh = "none",
mdoutputext = "html",
mdtohtml = "pandoc --standalone %docroot% -o %outputfile%",
mdtohtmlviewerlaunch = "google-chrome-beta %outputfile%",
mdtohtmlviewerrefresh = "none",
mdtopdf = "pandoc %docroot% -o %outputfile%",
mdtopdfviewerlaunch = "sioyek %outputfile%",
mdtopdfviewerrefresh = "none",
markdownoutputext = "html",
markdowntohtml = "pandoc --standalone %docroot% -o %outputfile%",
markdowntohtmlviewerlaunch = "google-chrome-beta %outputfile%",
markdowntohtmlviewerrefresh = "none",
markdowntopdf = "pandoc %docroot% -o %outputfile%",
markdowntopdfviewerlaunch = "sioyek %outputfile%",
markdowntopdfviewerrefresh = "none",
texoutputext = "pdf",
textopdf = "pdflatex -interaction=batchmode -halt-on-error -synctex=1 %docroot%",
textopdfviewerlaunch = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --reuse-instance %outputfile%",
textopdfviewerrefresh = "none",
textopdfforwardjump = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --reuse-instance --forward-search-file %srcfile% --forward-search-line %line% %outputfile%",
textopdfshorterror = "A=%outputfile% ; LOGFILE=\"${A%.pdf}.log\" ; rubber-info \"$LOGFILE\" 2>&1 | head -n 1",
delay = 250
}
vim.g.knap_settings = gknapsettings

View File

@@ -0,0 +1,20 @@
local leap = require('leap')
leap.setup {
case_insensitive = true,
-- Leaving the appropriate list empty effectively disables "smart" mode,
-- and forces auto-jump to be on or off.
--safe_labels = { . . . },
--labels = { . . . },
-- These keys are captured directly by the plugin at runtime.
special_keys = {
repeat_search = '<enter>',
next_match = '<enter>',
prev_match = '<tab>',
next_group = '<space>',
prev_group = '<tab>',
eol = '<space>',
},
}
leap.set_default_keymaps()

View File

@@ -0,0 +1 @@
let g:mkdp_filetypes = ['markdown', 'plantuml']

View File

@@ -0,0 +1,22 @@
require("neogen").setup({
--snippet_engine = 'ultisnips',
input_after_comment = true,
})
-- {
-- { nil, "///!", { no_results = true, type = { "func", "file", "class" } } },
-- { nil, "///! @file", { no_results = true, type = { "file" } } },
-- { nil, "///! * @brief $1", { no_results = true, type = { "func", "file", "class" } } },
-- { nil, "", { no_results = true, type = { "func", "file", "class" } } },
-- { nil, "", { no_results = true, type = { "file" } } },
--
-- { nil, "/**", { type = { "func", "class", "type" } } },
-- { i.ClassName, " * @class %s", { type = { "class" } } },
-- { i.Type, " * @typedef %s", { type = { "type" } } },
-- { nil, " * @brief $1", { type = { "func", "class", "type" } } },
-- { nil, " *", { type = { "func", "class", "type" } } },
-- { i.Tparam, " * @tparam %s $1" },
-- { i.Parameter, " * @param %s $1" },
-- { i.Return, " * @return $1" },
-- { nil, " */", { type = { "func", "class", "type" } } },
-- }

View File

@@ -0,0 +1,9 @@
"let g:signature_help_config = {
" \ 'border': v:true,
" \ 'maxWidth': 80,
" \ 'maxHeight': 30,
" \ 'style': "virtual",
" \ 'onTriggerChar': v:false,
" \ 'multiLabel': v:false,
" \ }
"call signature_help#enable()

View File

@@ -0,0 +1,11 @@
require("themer").setup({
colorscheme = "scery",
enable_installer = true,
styles = {
["function"] = { style = 'italic' },
functionbuiltin = { style = 'italic' },
variable = { style = 'italic' },
variableBuiltIn = { style = 'italic' },
parameter = { style = 'italic' },
},
})

View File

@@ -0,0 +1,12 @@
vim.wo.foldcolumn = '1'
vim.wo.foldlevel = 99 -- feel free to decrease the value
vim.wo.foldenable = true
-- tell the sever the capability of foldingRange
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
}
--require('ufo').setup()