maybe keys for nvimtree

This commit is contained in:
Christoph J. Scherr 2024-07-04 12:09:09 +02:00
parent 8ef1c64790
commit ecfdb8658f
3 changed files with 50 additions and 57 deletions

View File

@ -1,13 +1,13 @@
local opt = vim.opt local opt = vim.opt
local g = vim.g local g = vim.g
g.mapleader = " " g.mapleader = ' '
g.maplocalleader = ";" g.maplocalleader = ';'
g.python3_host_prog = '/usr/bin/python3' g.python3_host_prog = '/usr/bin/python3'
opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
opt.signcolumn = "yes" opt.signcolumn = 'yes'
opt.clipboard = "" -- don't just use the system clipboard opt.clipboard = '' -- don't just use the system clipboard
opt.wrap = false opt.wrap = false
opt.breakindent = false opt.breakindent = false
opt.spell = false opt.spell = false
@ -16,7 +16,7 @@ opt.undofile = true
opt.undolevels = 10000 opt.undolevels = 10000
opt.writebackup = false opt.writebackup = false
opt.history = 5000 opt.history = 5000
opt.shada = { "'1000", "<50", "s10", "h" } opt.shada = { "'1000", '<50', 's10', 'h' }
-- Tabs and Indents -- Tabs and Indents
-- === -- ===
@ -49,19 +49,19 @@ vim.opt.hlsearch = true -- highlight searched stuff
opt.wrap = false -- No wrap by default opt.wrap = false -- No wrap by default
opt.linebreak = true -- Break long lines at 'breakat' opt.linebreak = true -- Break long lines at 'breakat'
opt.breakat = "\\ \\ ;:,!?" -- Long lines break chars opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
opt.startofline = false -- Cursor in same column for few commands opt.startofline = false -- Cursor in same column for few commands
opt.splitbelow = true -- Splits open bottom right opt.splitbelow = true -- Splits open bottom right
opt.splitright = true opt.splitright = true
opt.breakindentopt = { shift = 2, min = 20 } opt.breakindentopt = { shift = 2, min = 20 }
opt.formatoptions = "" -- see :h fo-table & :h formatoptions opt.formatoptions = '' -- see :h fo-table & :h formatoptions
vim.opt.breakindent = true vim.opt.breakindent = true
-- Diff -- Diff
-- === -- ===
opt.diffopt:append { "iwhite", "indent-heuristic", "algorithm:patience" } opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
opt.wildmode = "longest:full,full" -- Command-line completion mode opt.wildmode = 'longest:full,full' -- Command-line completion mode
-- Folds -- Folds
-- === -- ===
@ -71,9 +71,9 @@ opt.foldlevel = 10 -- start with all folds open
-- Editor UI -- Editor UI
-- === -- ===
vim.o.guifont = "FiraCode Nerd Font:h15" vim.o.guifont = 'FiraCode Nerd Font:h15'
opt.termguicolors = true opt.termguicolors = true
opt.shortmess = "xsTOInfFitloCaAs" opt.shortmess = 'xsTOInfFitloCaAs'
opt.showmode = true -- Show mode in cmd window opt.showmode = true -- Show mode in cmd window
opt.scrolloff = 10 -- Keep at least n lines above/below opt.scrolloff = 10 -- Keep at least n lines above/below
opt.sidescrolloff = 10 -- Keep at least n lines left/right opt.sidescrolloff = 10 -- Keep at least n lines left/right
@ -101,7 +101,7 @@ vim.opt.inccommand = 'split'
if vim.g.neovide == true then if vim.g.neovide == true then
-- fulscreen with F11 -- fulscreen with F11
vim.api.nvim_set_keymap("n", "<F11>", ":let g:neovide_fullscreen = !g:neovide_fullscreen<CR>", {}) vim.api.nvim_set_keymap('n', '<F11>', ':let g:neovide_fullscreen = !g:neovide_fullscreen<CR>', {})
vim.g.neovide_underline_automatic_scaling = true vim.g.neovide_underline_automatic_scaling = true
@ -126,10 +126,10 @@ opt.showcmd = false -- show command in status line
opt.cmdheight = 0 opt.cmdheight = 0
opt.cmdwinheight = 5 -- Command-line lines opt.cmdwinheight = 5 -- Command-line lines
opt.equalalways = true -- Resize windows on split or close opt.equalalways = true -- Resize windows on split or close
opt.colorcolumn = "+0" -- Column highlight at textwidth's max character-limit opt.colorcolumn = '+0' -- Column highlight at textwidth's max character-limit
opt.cursorline = true opt.cursorline = true
opt.cursorlineopt = { "number", "screenline" } opt.cursorlineopt = { 'number', 'screenline' }
opt.pumheight = 10 -- Maximum number of items to show in the popup menu opt.pumheight = 10 -- Maximum number of items to show in the popup menu
opt.pumwidth = 10 -- Minimum width for the popup menu opt.pumwidth = 10 -- Minimum width for the popup menu
@ -139,16 +139,15 @@ opt.pumblend = 10 -- Popup blend
-- === -- ===
opt.spell = false -- manually enable spell with `set spell` or `<leader>ts` opt.spell = false -- manually enable spell with `set spell` or `<leader>ts`
opt.spelllang = "en,de_de," opt.spelllang = 'en,de_de,'
opt.spellsuggest = "double,50,timeout:5000" opt.spellsuggest = 'double,50,timeout:5000'
-- autocommands -- autocommands
-- === -- ===
local function augroup(name) local function augroup(name)
return vim.api.nvim_create_augroup("plex_" .. name, {}) return vim.api.nvim_create_augroup('plex_' .. name, {})
end end
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
@ -175,11 +174,32 @@ if not vim.loop.fs_stat(lazypath) then
end ---@diagnostic disable-next-line: undefined-field end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("custom.maps") require 'custom.maps'
require("custom.plugins") require('lazy').setup({
require("custom.plugins.ui") { import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
icons = vim.g.have_nerd_font and {} or {
cmd = '',
config = '🛠',
event = '📅',
ft = '📂',
init = '',
keys = '🗝',
plugin = '🔌',
runtime = '💻',
require = '🌙',
source = '📄',
start = '🚀',
task = '📌',
lazy = '💤 ',
},
},
})
require("kickstart.health") require 'kickstart.health'
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@ -1,8 +1,4 @@
-- You can add your own plugins here or in other files in this directory! return {
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
@ -663,25 +659,5 @@ require('lazy').setup({
-- --
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
}, { }
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
icons = vim.g.have_nerd_font and {} or {
cmd = '',
config = '🛠',
event = '📅',
ft = '📂',
init = '',
keys = '🗝',
plugin = '🔌',
runtime = '💻',
require = '🌙',
source = '📄',
start = '🚀',
task = '📌',
lazy = '💤 ',
},
},
})

View File

@ -2,15 +2,15 @@ return {
{ {
'nvim-tree/nvim-tree.lua', 'nvim-tree/nvim-tree.lua',
--opts = overrides.nvimtree, keys = {
{ '<F5>', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
{ '<leader>tf', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
},
}, },
{ {
'ggandor/leap.nvim', 'ggandor/leap.nvim',
lazy = false, lazy = false,
config = function()
require('core.utils').load_mappings 'leap'
end,
}, },
{ {
'ggandor/flit.nvim', 'ggandor/flit.nvim',
@ -36,9 +36,6 @@ return {
dependencies = { dependencies = {
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
}, },
init = function()
require('core.utils').load_mappings 'lazygit'
end,
}, },
{ {
'folke/which-key.nvim', 'folke/which-key.nvim',