mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-28 07:58:39 +00:00
chore(nvim): tweaks to options, cleanup
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
-- ── Install lazylazy ────────────────────────────────────────────────
|
-- ── Install lazylazy ────────────────────────────────────────────────
|
||||||
-- https://github.com/folke/lazy.nvim
|
-- https://github.com/folke/lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||||
local out = vim.fn.system {
|
local out = vim.fn.system {
|
||||||
'git',
|
'git',
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
local g = vim.g -- A table to store global variables
|
local g = vim.g -- A table to store global variables
|
||||||
local o = vim.opt -- A table to store global options
|
local o = vim.opt -- A table to store global options
|
||||||
|
local a = vim.api -- A table to store API functions
|
||||||
|
|
||||||
-- vim.global
|
-- vim.global
|
||||||
g.mapleader = ' ' -- Space as the leader key
|
g.mapleader = ' ' -- Space as the leader key
|
||||||
@@ -27,6 +28,8 @@ g.loaded_java_provider = 0 -- Disable java provider
|
|||||||
o.confirm = true -- Confirm before closing unsaved buffers
|
o.confirm = true -- Confirm before closing unsaved buffers
|
||||||
o.ignorecase = true -- Ignore case in search patterns
|
o.ignorecase = true -- Ignore case in search patterns
|
||||||
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
||||||
|
o.list = true -- Show invisible characters
|
||||||
|
o.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||||
o.number = true -- Show line numbers
|
o.number = true -- Show line numbers
|
||||||
o.numberwidth = 3 -- Set the width of the number column
|
o.numberwidth = 3 -- Set the width of the number column
|
||||||
o.relativenumber = true -- Show relative line numbers
|
o.relativenumber = true -- Show relative line numbers
|
||||||
@@ -40,20 +43,24 @@ o.splitright = true -- vsplit to the right
|
|||||||
o.termguicolors = true -- Enable GUI colors
|
o.termguicolors = true -- Enable GUI colors
|
||||||
o.timeoutlen = 250 -- Decrease mapped sequence wait time
|
o.timeoutlen = 250 -- Decrease mapped sequence wait time
|
||||||
o.updatetime = 250 -- 250 ms = 2,5 seconds
|
o.updatetime = 250 -- 250 ms = 2,5 seconds
|
||||||
o.sessionoptions =
|
|
||||||
'buffers,curdir,folds,tabpages,winsize,winpos,terminal,localoptions'
|
-- Session options
|
||||||
|
-- This is a comma separated list of options that will be
|
||||||
|
-- saved when a session ends.
|
||||||
|
local so = 'buffers,curdir,folds,tabpages,winsize,winpos,terminal,localoptions'
|
||||||
|
o.sessionoptions = so
|
||||||
|
|
||||||
o.wildmode = 'longest:full,full' -- Command-line completion mode
|
o.wildmode = 'longest:full,full' -- Command-line completion mode
|
||||||
|
|
||||||
-- Enable the colorcolumn
|
-- Enable the colorcolumn
|
||||||
vim.api.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
a.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
||||||
|
|
||||||
-- Sync clipboard between OS and Neovim.
|
-- Sync clipboard between OS and Neovim.
|
||||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||||
-- See `:help 'clipboard'`
|
-- See `:help 'clipboard'`
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
local c = vim.env.SSH_TTY and '' or 'unnamedplus'
|
local c = vim.env.SSH_TTY and '' or 'unnamedplus'
|
||||||
vim.opt.clipboard = c
|
o.clipboard = c
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
---@type blink.cmp.Config
|
|
||||||
opts = {
|
opts = {
|
||||||
snippets = { preset = 'luasnip' },
|
snippets = { preset = 'luasnip' },
|
||||||
-- 'default' for mappings similar to built-in completion
|
-- 'default' for mappings similar to built-in completion
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ return {
|
|||||||
'folke/snacks.nvim',
|
'folke/snacks.nvim',
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
lazy = false,
|
lazy = false,
|
||||||
---@type snacks.Config
|
|
||||||
opts = {
|
opts = {
|
||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
gitbrowse = { enabled = true },
|
gitbrowse = { enabled = true },
|
||||||
@@ -44,8 +43,8 @@ return {
|
|||||||
{
|
{
|
||||||
'folke/trouble.nvim',
|
'folke/trouble.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
cmd = 'Trouble',
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
---@type trouble.Config
|
|
||||||
opts = {
|
opts = {
|
||||||
auto_preview = true,
|
auto_preview = true,
|
||||||
auto_fold = true,
|
auto_fold = true,
|
||||||
@@ -53,13 +52,13 @@ return {
|
|||||||
use_lsp_diagnostic_signs = true,
|
use_lsp_diagnostic_signs = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Navigate your code with search labels, enhanced
|
-- Navigate your code with search labels, enhanced
|
||||||
-- character motions and Treesitter integration
|
-- character motions and Treesitter integration
|
||||||
-- https://github.com/folke/flash.nvim
|
-- https://github.com/folke/flash.nvim
|
||||||
{
|
{
|
||||||
'folke/flash.nvim',
|
'folke/flash.nvim',
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
---@type Flash.Config
|
|
||||||
opts = {},
|
opts = {},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ return {
|
|||||||
'rmagatti/auto-session',
|
'rmagatti/auto-session',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
version = '*',
|
version = '*',
|
||||||
---@module "auto-session"
|
|
||||||
---@type AutoSession.Config
|
|
||||||
opts = {
|
opts = {
|
||||||
suppressed_dirs = {
|
suppressed_dirs = {
|
||||||
'/',
|
'/',
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ return {
|
|||||||
'nvim-treesitter/nvim-treesitter-context',
|
'nvim-treesitter/nvim-treesitter-context',
|
||||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||||
},
|
},
|
||||||
---@type TSConfig
|
|
||||||
opts = {
|
opts = {
|
||||||
auto_install = true, -- Auto install the parser generators
|
auto_install = true, -- Auto install the parser generators
|
||||||
sync_install = false, -- Sync install the parser generators, install async
|
sync_install = false, -- Sync install the parser generators, install async
|
||||||
|
|||||||
Reference in New Issue
Block a user