Some options changed, e.g. wrapping for left,right in all modes

This commit is contained in:
2024-09-11 12:16:26 +02:00
parent df5434fd81
commit 92802c5688
3 changed files with 28 additions and 18 deletions

View File

@@ -10,3 +10,5 @@ vim.keymap.set('n', '<leader>fm', fzf.manpages, { desc = "Manpages" })
vim.keymap.set('n', '<leader>b', fzf.buffers, { desc = "Buffers" })
-- use fzf buffer lines as default search
vim.keymap.set('n', '/', fzf.blines, { desc = "Search buffer" })

View File

@@ -39,7 +39,6 @@ local on_attach = function(client, bufnr)
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
@@ -60,6 +59,9 @@ local on_attach = function(client, bufnr)
local fzf = require('fzf-lua')
vim.keymap.set('n', '<space>d', fzf.diagnostics_document , { desc = "Doc diagnostics" })
vim.keymap.set('n', '<space>s', fzf.lsp_document_symbols, { desc = "Doc symbols" })
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<C-[>', fzf.lsp_references, { desc = "Find References" })
vim.keymap.set('n', '<C-]>', fzf.lsp_definitions, { desc = "Find References" })
end
-- Set different settings for different languages' LSP

View File

@@ -1,25 +1,31 @@
-- Hint: use `:h <option>` to figure out the meaning if needed
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
-- Tab
vim.opt.tabstop = 4 -- number of visual spaces per TAB
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
vim.opt.tabstop = 4 -- number of visual spaces per TAB
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
-- UI config
vim.opt.number = true -- show absolute number
vim.opt.relativenumber = false -- add numbers to each line on the left side
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
vim.opt.number = true -- show absolute number
vim.opt.relativenumber = false -- add numbers to each line on the left side
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
-- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
-- Searching
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
-- Wrapping movements
vim.opt.whichwrap = "b,s,<,>,[,]" -- wrap backspace, space and left-right cursor keys
-- formatoptions not very well set
-- vim.opt.formatoptions = "tac"