First changes to kickstart
This commit is contained in:
parent
c80a77488b
commit
17e4e8264f
21
init.lua
21
init.lua
|
@ -86,7 +86,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- Useful status updates for LSP
|
-- Useful status updates for LSP
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
|
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
|
||||||
|
|
||||||
-- Additional lua configuration, makes nvim stuff amazing!
|
-- Additional lua configuration, makes nvim stuff amazing!
|
||||||
'folke/neodev.nvim',
|
'folke/neodev.nvim',
|
||||||
|
@ -110,7 +110,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Useful plugin to show you pending keybinds.
|
-- Useful plugin to show you pending keybinds.
|
||||||
{ 'folke/which-key.nvim', opts = {} },
|
{ 'folke/which-key.nvim', opts = {} },
|
||||||
{
|
{
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
|
@ -128,16 +128,16 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- don't override the built-in and fugitive keymaps
|
-- don't override the built-in and fugitive keymaps
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
vim.keymap.set({'n', 'v'}, ']c', function()
|
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
||||||
if vim.wo.diff then return ']c' end
|
if vim.wo.diff then return ']c' end
|
||||||
vim.schedule(function() gs.next_hunk() end)
|
vim.schedule(function() gs.next_hunk() end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
|
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
||||||
vim.keymap.set({'n', 'v'}, '[c', function()
|
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
||||||
if vim.wo.diff then return '[c' end
|
if vim.wo.diff then return '[c' end
|
||||||
vim.schedule(function() gs.prev_hunk() end)
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
|
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -221,7 +221,7 @@ 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: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
|
@ -233,6 +233,7 @@ vim.o.hlsearch = false
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
|
vim.wo.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode
|
-- Enable mouse mode
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
@ -254,6 +255,7 @@ vim.o.smartcase = true
|
||||||
|
|
||||||
-- Keep signcolumn on by default
|
-- Keep signcolumn on by default
|
||||||
vim.wo.signcolumn = 'yes'
|
vim.wo.signcolumn = 'yes'
|
||||||
|
vim.o.colorcolumn = '80'
|
||||||
|
|
||||||
-- Decrease update time
|
-- Decrease update time
|
||||||
vim.o.updatetime = 250
|
vim.o.updatetime = 250
|
||||||
|
@ -393,6 +395,11 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
|
||||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||||
|
|
||||||
|
-- Toggle diagnostics
|
||||||
|
require('toggle_lsp_diagnostics').init()
|
||||||
|
vim.keymap.set('n', '<leader>td', ':ToggleDiag<cr>', { desc = '[T]oggle [d]iagnostics' });
|
||||||
|
|
||||||
|
--vim.keymap.set('n', '<leader>td', require('toggle_lsp_diagnostics'))
|
||||||
-- [[ Configure LSP ]]
|
-- [[ Configure LSP ]]
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
|
|
|
@ -2,4 +2,6 @@
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {}
|
return {
|
||||||
|
'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim',
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue