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 g = vim.g
g.mapleader = " "
g.maplocalleader = ";"
g.mapleader = ' '
g.maplocalleader = ';'
g.python3_host_prog = '/usr/bin/python3'
opt.mouse = "a" -- mouse does annoying things for me if it's not 'a'
opt.signcolumn = "yes"
opt.clipboard = "" -- don't just use the system clipboard
opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
opt.signcolumn = 'yes'
opt.clipboard = '' -- don't just use the system clipboard
opt.wrap = false
opt.breakindent = false
opt.spell = false
@ -16,7 +16,7 @@ opt.undofile = true
opt.undolevels = 10000
opt.writebackup = false
opt.history = 5000
opt.shada = { "'1000", "<50", "s10", "h" }
opt.shada = { "'1000", '<50', 's10', 'h' }
-- Tabs and Indents
-- ===
@ -49,19 +49,19 @@ vim.opt.hlsearch = true -- highlight searched stuff
opt.wrap = false -- No wrap by default
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.splitbelow = true -- Splits open bottom right
opt.splitright = true
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
-- Diff
-- ===
opt.diffopt:append { "iwhite", "indent-heuristic", "algorithm:patience" }
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
opt.wildmode = 'longest:full,full' -- Command-line completion mode
-- Folds
-- ===
@ -71,9 +71,9 @@ opt.foldlevel = 10 -- start with all folds open
-- Editor UI
-- ===
vim.o.guifont = "FiraCode Nerd Font:h15"
vim.o.guifont = 'FiraCode Nerd Font:h15'
opt.termguicolors = true
opt.shortmess = "xsTOInfFitloCaAs"
opt.shortmess = 'xsTOInfFitloCaAs'
opt.showmode = true -- Show mode in cmd window
opt.scrolloff = 10 -- Keep at least n lines above/below
opt.sidescrolloff = 10 -- Keep at least n lines left/right
@ -101,7 +101,7 @@ vim.opt.inccommand = 'split'
if vim.g.neovide == true then
-- 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
@ -126,10 +126,10 @@ opt.showcmd = false -- show command in status line
opt.cmdheight = 0
opt.cmdwinheight = 5 -- Command-line lines
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.cursorlineopt = { "number", "screenline" }
opt.cursorlineopt = { 'number', 'screenline' }
opt.pumheight = 10 -- Maximum number of items to show in 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.spelllang = "en,de_de,"
opt.spellsuggest = "double,50,timeout:5000"
opt.spelllang = 'en,de_de,'
opt.spellsuggest = 'double,50,timeout:5000'
-- autocommands
-- ===
local function augroup(name)
return vim.api.nvim_create_augroup("plex_" .. name, {})
return vim.api.nvim_create_augroup('plex_' .. name, {})
end
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
@ -175,11 +174,32 @@ if not vim.loop.fs_stat(lazypath) then
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
require("custom.maps")
require("custom.plugins")
require("custom.plugins.ui")
require 'custom.maps'
require('lazy').setup({
{ 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`
-- 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!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
require('lazy').setup({
return {
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'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.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-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 = '💤 ',
},
},
})
{ import = 'custom.plugins' },
}

View File

@ -2,15 +2,15 @@ return {
{
'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',
lazy = false,
config = function()
require('core.utils').load_mappings 'leap'
end,
},
{
'ggandor/flit.nvim',
@ -36,9 +36,6 @@ return {
dependencies = {
'nvim-lua/plenary.nvim',
},
init = function()
require('core.utils').load_mappings 'lazygit'
end,
},
{
'folke/which-key.nvim',