kludge "Reveal"
This commit is contained in:
		
							parent
							
								
									4baccf1f8b
								
							
						
					
					
						commit
						490c1cd331
					
				|  | @ -8,7 +8,7 @@ return { | ||||||
| 
 | 
 | ||||||
|   { |   { | ||||||
|     "nvim-tree/nvim-web-devicons", |     "nvim-tree/nvim-web-devicons", | ||||||
|     opts = {} |     lazy = true | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   { |   { | ||||||
|  | @ -84,6 +84,7 @@ return { | ||||||
|       local null_ls = require("null-ls") |       local null_ls = require("null-ls") | ||||||
|       null_ls.setup({ |       null_ls.setup({ | ||||||
|         sources = { |         sources = { | ||||||
|  |           null_ls.builtins.formatting.lua_format, | ||||||
|           null_ls.builtins.formatting.prettierd, |           null_ls.builtins.formatting.prettierd, | ||||||
|         }, |         }, | ||||||
|       }) |       }) | ||||||
|  |  | ||||||
|  | @ -1,20 +1,23 @@ | ||||||
| -- RevealInFinder | -- RevealInFinder | ||||||
| -- --------------------------------------------------------------------------- | -- --------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| -- set this to leader-e |  | ||||||
| vim.cmd([[ | vim.cmd([[ | ||||||
| function! s:RevealInFinder() |   function! s:RevealInFinder() | ||||||
|     if filereadable(expand("%")) |     if filereadable(expand("%")) | ||||||
|     let l:command = "open -R %" |       let l:command = "xdg-open -R %" | ||||||
|     elseif getftype(expand("%:p:h")) == "dir" |     elseif getftype(expand("%:p:h")) == "dir" | ||||||
|     let l:command = "open %:p:h" |       let l:command = "xdg-open %:p:h" | ||||||
|     else |     else | ||||||
|     let l:command = "open ." |       let l:command = "xdg-open ." | ||||||
|     endif |     endif | ||||||
|       execute ":silent! !" . l:command |       execute ":silent! !" . l:command | ||||||
|     redraw! |     redraw! | ||||||
| endfunction |   endfunction | ||||||
| command! Reveal call <SID>RevealInFinder() | 
 | ||||||
|  |   command! Reveal call <SID>RevealInFinder() | ||||||
| ]]) | ]]) | ||||||
| 
 | 
 | ||||||
| return {} | vim.keymap.set('n', '<leader>R', ":Reveal<CR>", { noremap = true, desc = '[R]eveal with xdg-open' }) | ||||||
|  | 
 | ||||||
|  | return { | ||||||
|  | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue