updates
This commit is contained in:
parent
6a1a1589a2
commit
20044c837d
55
init.lua
55
init.lua
|
|
@ -329,7 +329,7 @@ require('lazy').setup({
|
|||
-- },
|
||||
defaults = {
|
||||
path_display = {
|
||||
shorten = 2,
|
||||
shorten = 4,
|
||||
},
|
||||
},
|
||||
-- pickers = {}
|
||||
|
|
@ -346,7 +346,7 @@ require('lazy').setup({
|
|||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<C-p>', builtin.find_files)
|
||||
vim.keymap.set('n', '<C-p>', builtin.oldfiles)
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
|
|
@ -551,19 +551,20 @@ require('lazy').setup({
|
|||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
} or {},
|
||||
virtual_text = {
|
||||
source = 'if_many',
|
||||
spacing = 2,
|
||||
format = function(diagnostic)
|
||||
local diagnostic_message = {
|
||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
||||
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
||||
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
||||
}
|
||||
return diagnostic_message[diagnostic.severity]
|
||||
end,
|
||||
},
|
||||
virtual_text = false,
|
||||
-- virtual_text = {
|
||||
-- source = 'if_many',
|
||||
-- spacing = 2,
|
||||
-- format = function(diagnostic)
|
||||
-- local diagnostic_message = {
|
||||
-- [vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||
-- [vim.diagnostic.severity.WARN] = diagnostic.message,
|
||||
-- [vim.diagnostic.severity.INFO] = diagnostic.message,
|
||||
-- [vim.diagnostic.severity.HINT] = diagnostic.message,
|
||||
-- }
|
||||
-- return diagnostic_message[diagnostic.severity]
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||
|
|
@ -850,22 +851,22 @@ require('lazy').setup({
|
|||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
-- - sd' - [S]urround [D]elete [']quotes
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require('mini.surround').setup()
|
||||
-- require('mini.surround').setup()
|
||||
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
local statusline = require 'mini.statusline'
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
statusline.section_location = function()
|
||||
return '%2l:%-2v'
|
||||
end
|
||||
-- local statusline = require 'mini.statusline'
|
||||
-- -- set use_icons to true if you have a Nerd Font
|
||||
-- statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
--
|
||||
-- -- You can configure sections in the statusline by overriding their
|
||||
-- -- default behavior. For example, here we set the section for
|
||||
-- -- cursor location to LINE:COLUMN
|
||||
-- ---@diagnostic disable-next-line: duplicate-set-field
|
||||
-- statusline.section_location = function()
|
||||
-- return '%2l:%-2v'
|
||||
-- end
|
||||
|
||||
-- ... and there is more!
|
||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
init = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 100,
|
||||
tabline = 100,
|
||||
winbar = 100,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff' },
|
||||
lualine_c = { 'local', 'filename' },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
@ -9,10 +9,24 @@ return {
|
|||
skip_confirm_for_simple_edits = true,
|
||||
|
||||
float = {
|
||||
max_width = 0.8,
|
||||
padding = 2,
|
||||
max_width = 90,
|
||||
max_height = 0,
|
||||
},
|
||||
win_options = {
|
||||
wrap = true,
|
||||
winblend = 0,
|
||||
},
|
||||
keymaps = {
|
||||
['<C-c>'] = false,
|
||||
['<esc><esc>'] = 'actions.close',
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
natural_order = true,
|
||||
is_always_hidden = function(name, _)
|
||||
return name == '..' or name == '.git'
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- Optional dependencies
|
||||
|
|
|
|||
Loading…
Reference in New Issue