window setup customization

This commit is contained in:
rolchau 2026-03-21 18:10:16 +01:00
parent 0619d89884
commit 67dcdf7cbf
3 changed files with 114 additions and 6 deletions

View File

@ -700,7 +700,7 @@ require('lazy').setup({
-- python = { "isort", "black" },
--
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
javascript = { 'prettierd', 'prettier', stop_after_first = true },
},
},
},
@ -914,13 +914,13 @@ require('lazy').setup({
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!

View File

@ -0,0 +1,3 @@
return {
'h3pei/copy-file-path.nvim',
}

View File

@ -3,6 +3,111 @@
--
-- See the kickstart.nvim README for more information
---@module 'lazy'
---@type LazySpec
return {}
vim.keymap.set('n', 'x', '"_x') -- Delete without yanking
vim.keymap.set('n', '<leader>pv', ':Ex<CR>') -- Open file explorer
-- Windows specific stuff:
vim.keymap.set('n', '½', '$') -- Move to end of line in normal mode
vim.keymap.set('v', '½', '$') -- Move to end of line in visual mode
vim.keymap.set('o', '½', '$') -- operator-pending mode to end of line
vim.o.updatetime = 250
vim.wo.signcolumn = 'yes'
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.incsearch = true
vim.opt.hlsearch = false
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.backup = false
vim.opt.writebackup = false
vim.opt.cmdheight = 1
vim.opt.scrolloff = 8
vim.opt.signcolumn = 'yes'
vim.opt.colorcolumn = '120'
vim.opt.cursorline = true
vim.opt.autoindent = true
vim.opt.termguicolors = true
vim.opt.winblend = 0
vim.opt.wildoptions = 'pum'
vim.opt.pumblend = 5
vim.opt.background = 'dark'
vim.opt.wrap = false
vim.opt.clipboard = 'unnamedplus'
vim.g.vimwiki_list = {
{ path = '~/Jottacloud/vimwiki' },
}
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
expr = true,
replace_keycodes = false,
})
-- #vim.g.copilot_no_tab_map = true
--
-- Windows specific stuff:
if vim.fn.has 'wsl' == 1 then
vim.g.clipboard = {
name = 'WslClipboard',
copy = {
['+'] = 'clip.exe',
['*'] = 'clip.exe',
},
paste = {
['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw))',
['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw))',
},
cache_enabled = 0,
}
end
return {
'vimwiki/vimwiki',
'brenoprata10/nvim-highlight-colors', -- highlight colors in files
'github/copilot.vim',
-- Configure Telescope to allow buffer deletion
{
'nvim-telescope/telescope.nvim',
opts = function(_, opts)
local actions = require 'telescope.actions'
-- Ensure pickers table exists
opts.pickers = opts.pickers or {}
-- Configure buffers picker with deletion mapping
-- Note: <C-x> conflicts with horizontal split, so we use <C-q> instead
-- <C-d> conflicts with preview scroll down
-- dd doesn't work because Telescope doesn't support multi-key sequences in normal mode
opts.pickers.buffers = {
mappings = {
i = {
['<C-q>'] = actions.delete_buffer, -- Recommended: no conflicts
},
n = {
['d'] = actions.delete_buffer, -- Single 'd' key (simple and works)
['<C-q>'] = actions.delete_buffer,
},
},
}
return opts
end,
},
{
'stevearc/conform.nvim',
opts = function(_, opts)
opts.formatters_by_ft = opts.formatters_by_ft or {}
opts.formatters_by_ft.typescript = { 'prettierd', 'prettier', stop_after_first = true }
opts.formatters_by_ft.typescriptreact = { 'prettierd', 'prettier', stop_after_first = true }
opts.formatters_by_ft.javascriptreact = { 'prettierd', 'prettier', stop_after_first = true }
return opts
end,
},
}