added vitual chars for whitespaces.
This commit is contained in:
		
							parent
							
								
									c7de6a790e
								
							
						
					
					
						commit
						ec4a477c3a
					
				
					 2 changed files with 52 additions and 28 deletions
				
			
		| 
						 | 
					@ -35,7 +35,7 @@ opt.breakindent = true
 | 
				
			||||||
opt.colorcolumn = "80,100,120"
 | 
					opt.colorcolumn = "80,100,120"
 | 
				
			||||||
--add ruler to side of screen.
 | 
					--add ruler to side of screen.
 | 
				
			||||||
opt.number = true
 | 
					opt.number = true
 | 
				
			||||||
opt.numberwidth=3
 | 
					opt.numberwidth = 3
 | 
				
			||||||
--displays cordinates of your cursor in statusbar
 | 
					--displays cordinates of your cursor in statusbar
 | 
				
			||||||
opt.ruler = true
 | 
					opt.ruler = true
 | 
				
			||||||
--always leave 5 cells between cursor and side of window.
 | 
					--always leave 5 cells between cursor and side of window.
 | 
				
			||||||
| 
						 | 
					@ -58,8 +58,8 @@ opt.autoindent = true
 | 
				
			||||||
opt.smartindent = true
 | 
					opt.smartindent = true
 | 
				
			||||||
opt.smarttab = true
 | 
					opt.smarttab = true
 | 
				
			||||||
--space based tabs.
 | 
					--space based tabs.
 | 
				
			||||||
opt.softtabstop=-1 --negative value inherrits shiftwidth.
 | 
					opt.softtabstop = -1 --negative value inherrits shiftwidth.
 | 
				
			||||||
opt.expandtab=true
 | 
					opt.expandtab = true
 | 
				
			||||||
--highlight search results as you type.
 | 
					--highlight search results as you type.
 | 
				
			||||||
opt.hlsearch = true
 | 
					opt.hlsearch = true
 | 
				
			||||||
opt.incsearch = true
 | 
					opt.incsearch = true
 | 
				
			||||||
| 
						 | 
					@ -72,9 +72,20 @@ opt.fillchars = 'stl:=,stlnc: ,vert:|,fold:-'
 | 
				
			||||||
opt.foldcolumn = 'auto:4'
 | 
					opt.foldcolumn = 'auto:4'
 | 
				
			||||||
opt.foldenable = true
 | 
					opt.foldenable = true
 | 
				
			||||||
opt.foldignore = ''
 | 
					opt.foldignore = ''
 | 
				
			||||||
 | 
					--display whitespace as other chars:
 | 
				
			||||||
 | 
					opt.list = true
 | 
				
			||||||
 | 
					opt.listchars = {
 | 
				
			||||||
 | 
					    tab = '>-',
 | 
				
			||||||
 | 
					    eol = '↲',
 | 
				
			||||||
 | 
					    nbsp='␣',
 | 
				
			||||||
 | 
					    trail='•',
 | 
				
			||||||
 | 
					    extends = '⟩',
 | 
				
			||||||
 | 
					    precedes = '⟨'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					opt.showbreak = '↪'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--sets colorscheme. to get a list of avalible options, do colorscheme <Space> <C-d>
 | 
					--sets colorscheme. to get a list of avalible options, do colorscheme <Space> <C-d>
 | 
				
			||||||
vim.opt.background="dark"
 | 
					vim.opt.background = "dark"
 | 
				
			||||||
-- vim.cmd 'colorscheme moonfly'
 | 
					-- vim.cmd 'colorscheme moonfly'
 | 
				
			||||||
-- vim.cmd 'colorscheme nightfly'
 | 
					-- vim.cmd 'colorscheme nightfly'
 | 
				
			||||||
-- vim.cmd 'colorscheme nordic'
 | 
					-- vim.cmd 'colorscheme nordic'
 | 
				
			||||||
| 
						 | 
					@ -103,7 +114,7 @@ end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--keyboard mappings
 | 
					--keyboard mappings
 | 
				
			||||||
local function optsWithDesc(desc)
 | 
					local function optsWithDesc(desc)
 | 
				
			||||||
	return {silent=true, desc=desc}
 | 
					    return { silent = true, desc = desc }
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
--toggle spell check
 | 
					--toggle spell check
 | 
				
			||||||
map('n', '<leader>cs', ':setlocal spell!<CR>', optsWithDesc("toggle spell check"))
 | 
					map('n', '<leader>cs', ':setlocal spell!<CR>', optsWithDesc("toggle spell check"))
 | 
				
			||||||
| 
						 | 
					@ -125,8 +136,8 @@ map('n', '<leader>t', ':NvimTreeToggle<CR>', optsWithDesc("toggle file browser")
 | 
				
			||||||
--telescope stuff
 | 
					--telescope stuff
 | 
				
			||||||
-- setup leader-f prefix in whitch-key
 | 
					-- setup leader-f prefix in whitch-key
 | 
				
			||||||
wk.register {
 | 
					wk.register {
 | 
				
			||||||
	["<leader>f"]={
 | 
					    ["<leader>f"] = {
 | 
				
			||||||
		name="+telescope"
 | 
					        name = "+telescope"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
map('n', '<leader>ff', ':Telescope find_files<CR>', optsWithDesc("find files"))
 | 
					map('n', '<leader>ff', ':Telescope find_files<CR>', optsWithDesc("find files"))
 | 
				
			||||||
| 
						 | 
					@ -152,7 +163,9 @@ map('n', '<leader>v', ":lua Toggle_venn()", optsWithDesc("toggle venn.nvim"))
 | 
				
			||||||
map('n', '<leader>j', ':TSJToggle<CR>', optsWithDesc("treesitter split/join"))
 | 
					map('n', '<leader>j', ':TSJToggle<CR>', optsWithDesc("treesitter split/join"))
 | 
				
			||||||
-- a dedicated floating scratch terminal, seperate from the normal toggleterm terminals.
 | 
					-- a dedicated floating scratch terminal, seperate from the normal toggleterm terminals.
 | 
				
			||||||
local Terminal = require('toggleterm.terminal').Terminal
 | 
					local Terminal = require('toggleterm.terminal').Terminal
 | 
				
			||||||
Floatingterm = Terminal:new({ hidden = true,
 | 
					Floatingterm   = Terminal:new({
 | 
				
			||||||
direction="float"})
 | 
					    hidden = true,
 | 
				
			||||||
 | 
					    direction = "float"
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
vim.api.nvim_set_keymap("n", "<leader>s", ':lua Floatingterm:toggle()<CR>', optsWithDesc("open scratch terminal"))
 | 
					vim.api.nvim_set_keymap("n", "<leader>s", ':lua Floatingterm:toggle()<CR>', optsWithDesc("open scratch terminal"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,6 +68,17 @@ opt.fillchars = 'stl:=,stlnc: ,vert:|,fold:-'
 | 
				
			||||||
opt.foldcolumn = 'auto:4'
 | 
					opt.foldcolumn = 'auto:4'
 | 
				
			||||||
opt.foldenable = true
 | 
					opt.foldenable = true
 | 
				
			||||||
opt.foldignore = ''
 | 
					opt.foldignore = ''
 | 
				
			||||||
 | 
					--display whitespace as other chars:
 | 
				
			||||||
 | 
					opt.list = true
 | 
				
			||||||
 | 
					opt.listchars = {
 | 
				
			||||||
 | 
					    tab = '>-',
 | 
				
			||||||
 | 
					    eol = '↲',
 | 
				
			||||||
 | 
					    nbsp='␣',
 | 
				
			||||||
 | 
					    trail='•',
 | 
				
			||||||
 | 
					    extends = '⟩',
 | 
				
			||||||
 | 
					    precedes = '⟨'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					opt.showbreak = '↪'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--keyboard mappings
 | 
					--keyboard mappings
 | 
				
			||||||
local function optsWithDesc(desc)
 | 
					local function optsWithDesc(desc)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue