update
add noice
This commit is contained in:
		
							parent
							
								
									ff9bf47099
								
							
						
					
					
						commit
						48cfacde4e
					
				
							
								
								
									
										5
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								init.lua
									
									
									
									
									
								
							@ -16,12 +16,13 @@ vim.opt.runtimepath:prepend(lazypath)
 | 
			
		||||
vim.api.nvim_create_autocmd('User', {
 | 
			
		||||
	pattern = 'LazyVimStarted',
 | 
			
		||||
	callback = function()
 | 
			
		||||
		vim.cmd 'colorscheme neogruber'
 | 
			
		||||
		require 'feline'
 | 
			
		||||
		require 'flash'
 | 
			
		||||
		require 'config.mappings'
 | 
			
		||||
		require 'config.autocmd'
 | 
			
		||||
--		require 'noice'
 | 
			
		||||
		require 'nvim-treesitter'
 | 
			
		||||
		vim.cmd 'colorscheme neogruber'
 | 
			
		||||
		require 'noice'
 | 
			
		||||
	end,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -4,9 +4,10 @@ require('lazy').setup('plugins', {
 | 
			
		||||
		enabled = false,
 | 
			
		||||
	},
 | 
			
		||||
	performance = {
 | 
			
		||||
		reset_packpath = true,
 | 
			
		||||
		rtp = {
 | 
			
		||||
			reset = true,
 | 
			
		||||
			paths = { '~/.local/share/nvim/site/' },
 | 
			
		||||
			-- paths = { '~/.local/share/nvim/site/' },
 | 
			
		||||
			disabled_plugins = {
 | 
			
		||||
				'fzf',
 | 
			
		||||
				'gzip',
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,7 @@ keymap('n', 'D', '"_d', { noremap = true })
 | 
			
		||||
 | 
			
		||||
keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opt)
 | 
			
		||||
keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opt)
 | 
			
		||||
keymap('n', 'gr', '<cmd>TroubleToggle lsp_references<CR>', opt)
 | 
			
		||||
keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.hover()<CR>', opt)
 | 
			
		||||
keymap('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<CR>', opt)
 | 
			
		||||
keymap('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<CR>', opt)
 | 
			
		||||
 | 
			
		||||
@ -124,6 +124,10 @@ local function selectionCount()
 | 
			
		||||
	return "" .. tostring(lines) .. "L " .. tostring(vim.fn.wordcount().visual_chars) .. "C"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local function startupTime()
 | 
			
		||||
	return tostring(require'lazy'.stats().startuptime)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
M.feline_c = {
 | 
			
		||||
	right_separator = {
 | 
			
		||||
		provider = '',
 | 
			
		||||
@ -253,6 +257,11 @@ M.feline_c = {
 | 
			
		||||
			end,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	startup = {
 | 
			
		||||
		provider = startupTime,
 | 
			
		||||
		left_sep = ' ',
 | 
			
		||||
		right_sep = ' ',
 | 
			
		||||
	},
 | 
			
		||||
	select_count = {
 | 
			
		||||
		provider = selectionCount,
 | 
			
		||||
		hl = function()
 | 
			
		||||
 | 
			
		||||
@ -34,6 +34,7 @@ return {
 | 
			
		||||
			c.search_count,
 | 
			
		||||
			c.macro,
 | 
			
		||||
			c.file_encoding,
 | 
			
		||||
			-- c.startup,
 | 
			
		||||
			c.line_percentage,
 | 
			
		||||
			c.select_count,
 | 
			
		||||
			c.position,
 | 
			
		||||
 | 
			
		||||
@ -110,12 +110,12 @@ function M.config()
 | 
			
		||||
 | 
			
		||||
	vim.diagnostic.config(utils.lsp_config)
 | 
			
		||||
 | 
			
		||||
	vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, {
 | 
			
		||||
		border = 'rounded',
 | 
			
		||||
	})
 | 
			
		||||
	vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, {
 | 
			
		||||
		border = 'rounded',
 | 
			
		||||
	})
 | 
			
		||||
	-- vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, {
 | 
			
		||||
	-- 	border = 'rounded',
 | 
			
		||||
	-- })
 | 
			
		||||
	-- vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, {
 | 
			
		||||
	-- 	border = 'rounded',
 | 
			
		||||
	-- })
 | 
			
		||||
	local on_references = vim.lsp.handlers['textDocument/references']
 | 
			
		||||
	vim.lsp.handlers['textDocument/references'] = vim.lsp.with(on_references, {
 | 
			
		||||
		-- Use location list instead of quickfix list
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										31
									
								
								lua/plugins/noice.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								lua/plugins/noice.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,31 @@
 | 
			
		||||
return {
 | 
			
		||||
	"folke/noice.nvim",
 | 
			
		||||
	-- event = "VeryLazy",
 | 
			
		||||
	opts = {
 | 
			
		||||
		lsp = {
 | 
			
		||||
			-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
 | 
			
		||||
			override = {
 | 
			
		||||
				["vim.lsp.util.convert_input_to_markdown_lines"] = true,
 | 
			
		||||
				["vim.lsp.util.stylize_markdown"] = true,
 | 
			
		||||
				["cmp.entry.get_documentation"] = true,
 | 
			
		||||
			},
 | 
			
		||||
			-- signature = {
 | 
			
		||||
			-- 	enabled = false,
 | 
			
		||||
			-- },
 | 
			
		||||
			-- hover = {
 | 
			
		||||
			-- 	enabled = false,
 | 
			
		||||
			-- },
 | 
			
		||||
		},
 | 
			
		||||
		-- you can enable a preset for easier configuration
 | 
			
		||||
		presets = {
 | 
			
		||||
			bottom_search = true, -- use a classic bottom cmdline for search
 | 
			
		||||
			command_palette = true, -- position the cmdline and popupmenu together
 | 
			
		||||
			long_message_to_split = true, -- long messages will be sent to a split
 | 
			
		||||
			inc_rename = false, -- enables an input dialog for inc-rename.nvim
 | 
			
		||||
			lsp_doc_border = false, -- add a border to hover docs and signature help
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	dependencies = {
 | 
			
		||||
		"MunifTanjim/nui.nvim",
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@ -19,11 +19,11 @@ return {
 | 
			
		||||
			close = "q", -- close the list
 | 
			
		||||
			cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
 | 
			
		||||
			refresh = "r", -- manually refresh
 | 
			
		||||
			jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
 | 
			
		||||
			jump = { "o", "<tab>" }, -- jump to the diagnostic or open / close folds
 | 
			
		||||
			open_split = { "<c-x>" }, -- open buffer in new split
 | 
			
		||||
			open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
 | 
			
		||||
			open_tab = { "<c-t>" }, -- open buffer in new tab
 | 
			
		||||
			jump_close = { "o" }, -- jump to the diagnostic and close the list
 | 
			
		||||
			jump_close = { "<cr>" }, -- jump to the diagnostic and close the list
 | 
			
		||||
			toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
 | 
			
		||||
			switch_severity = "s", -- switch "diagnostics" severity filter level to HINT / INFO / WARN / ERROR
 | 
			
		||||
			toggle_preview = "P", -- toggle auto_preview
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user