update
This commit is contained in:
		
							parent
							
								
									3267f8d2a4
								
							
						
					
					
						commit
						66954fc125
					
				
							
								
								
									
										8
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										8
									
								
								init.lua
								
								
								
								
							| 
						 | 
				
			
			@ -96,7 +96,7 @@ require('lazy').setup({
 | 
			
		|||
      { 'j-hui/fidget.nvim', opts = {} },
 | 
			
		||||
 | 
			
		||||
      -- Additional lua configuration, makes nvim stuff amazing!
 | 
			
		||||
      'folkenvim_set_keymap/neodev.nvim',
 | 
			
		||||
      'folke/neodev.nvim',
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -130,6 +130,7 @@ require('lazy').setup({
 | 
			
		|||
    'navarasu/onedark.nvim',
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  { -- Add indentation guides even on blank lines
 | 
			
		||||
    'lukas-reineke/indent-blankline.nvim',
 | 
			
		||||
    -- Enable `lukas-reineke/indent-blankline.nvim`
 | 
			
		||||
| 
						 | 
				
			
			@ -303,7 +304,7 @@ vim.api.nvim_set_keymap('n', '<leader>cb', ':bd<CR>', { noremap = true, silent =
 | 
			
		|||
vim.g.copilot_no_tab_map = true
 | 
			
		||||
vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
 | 
			
		||||
 | 
			
		||||
-- vim.api.nvim_set_keymap('n', ':', '<cmd>FineCmdline<CR>', { noremap = true })
 | 
			
		||||
vim.api.nvim_set_keymap('n', ':', '<cmd>FineCmdline<CR>', { noremap = true })
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_set_keymap('n', '<leader>hs', ':nohlsearch<CR>',
 | 
			
		||||
  { noremap = true, silent = true, desc = "toggle of search highlight" })
 | 
			
		||||
| 
						 | 
				
			
			@ -562,6 +563,7 @@ require('neodev').setup()
 | 
			
		|||
local capabilities = vim.lsp.protocol.make_client_capabilities()
 | 
			
		||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- Setup mason so it can manage external tooling
 | 
			
		||||
require('mason').setup()
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -628,6 +630,8 @@ cmp.setup {
 | 
			
		|||
    { name = 'orgmode' },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
--
 | 
			
		||||
-- The line beneath this is called `modeline`. See `:help modeline`
 | 
			
		||||
-- vim: ts=2 sts=2 sw=2 et
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
return {
 | 
			
		||||
	{ 'kevinhwang91/nvim-ufo',
 | 
			
		||||
		dependecies = 'kevinhwang91/promise-async' },
 | 
			
		||||
	config = function()
 | 
			
		||||
		vim.o.foldcolumn = '1' -- '0' is not bad
 | 
			
		||||
		vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
 | 
			
		||||
		vim.o.foldlevelstart = 99
 | 
			
		||||
		vim.o.foldenable = true
 | 
			
		||||
		vim.opt.foldlevel = 20
 | 
			
		||||
		vim.opt.foldmethod = "expr"
 | 
			
		||||
		vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
 | 
			
		||||
 | 
			
		||||
		-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
 | 
			
		||||
		vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
 | 
			
		||||
		vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		-- Option 2: nvim lsp as LSP client
 | 
			
		||||
		-- Tell the server the capability of foldingRange,
 | 
			
		||||
		-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
 | 
			
		||||
		local capabilities = vim.lsp.protocol.make_client_capabilities()
 | 
			
		||||
		capabilities.textDocument.foldingRange = {
 | 
			
		||||
			dynamicRegistration = false,
 | 
			
		||||
			lineFoldingOnly = true
 | 
			
		||||
		}
 | 
			
		||||
		local language_servers = require("lspconfig").util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
 | 
			
		||||
		for _, ls in ipairs(language_servers) do
 | 
			
		||||
			require('lspconfig')[ls].setup({
 | 
			
		||||
				capabilities = capabilities
 | 
			
		||||
				-- you can add other fields for setting up lsp server in this table
 | 
			
		||||
			})
 | 
			
		||||
		end
 | 
			
		||||
		require('ufo').setup()
 | 
			
		||||
		--
 | 
			
		||||
	end
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
-- plugin which aim to provide better tabbing experience
 | 
			
		||||
 | 
			
		||||
return {
 | 
			
		||||
	"abecodes/tabout.nvim",
 | 
			
		||||
	event = "VeryLazy",
 | 
			
		||||
	dependencies = {
 | 
			
		||||
		"nvim-treesitter/nvim-treesitter",
 | 
			
		||||
		"hrsh7th/nvim-cmp",
 | 
			
		||||
	},
 | 
			
		||||
	config = true,
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue