update
This commit is contained in:
		
							parent
							
								
									95be724fd4
								
							
						
					
					
						commit
						886194706e
					
				
					 1 changed files with 37 additions and 20 deletions
				
			
		
							
								
								
									
										57
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								init.lua
									
									
									
									
									
								
							|  | @ -74,6 +74,9 @@ require("lazy").setup({ | ||||||
| 		}, | 		}, | ||||||
| 		init = function() vim.g.barbar_auto_setup = false end, | 		init = function() vim.g.barbar_auto_setup = false end, | ||||||
| 		opts = { | 		opts = { | ||||||
|  | 			icons = { | ||||||
|  | 				pinned = { button = '', filename = true }, | ||||||
|  | 			} | ||||||
| 		}, | 		}, | ||||||
| 		version = '^1.0.0', | 		version = '^1.0.0', | ||||||
| 	}, | 	}, | ||||||
|  | @ -103,14 +106,19 @@ require("lazy").setup({ | ||||||
| 		version = '^4', -- Recommended | 		version = '^4', -- Recommended | ||||||
| 		lazy = false, -- This plugin is already lazy | 		lazy = false, -- This plugin is already lazy | ||||||
| 	}, | 	}, | ||||||
| 	"jose-elias-alvarez/null-ls.nvim" | 	{ | ||||||
| }) | 		"folke/which-key.nvim", | ||||||
| 
 | 		event = "VeryLazy", | ||||||
| local null_ls = require("null-ls") | 		init = function() | ||||||
| null_ls.setup({ | 			vim.o.timeout = true | ||||||
| 	sources = { | 			vim.o.timeoutlen = 300 | ||||||
| 		null_ls.builtins.formatting.yapf | 		end, | ||||||
| 	}, | 		opts = { | ||||||
|  | 			-- your configuration comes here | ||||||
|  | 			-- or leave it empty to use the default settings | ||||||
|  | 			-- refer to the configuration section below | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| require("image").setup({}) | require("image").setup({}) | ||||||
|  | @ -181,6 +189,16 @@ vim.api.nvim_create_autocmd('BufWritePre', { | ||||||
| 		vim.lsp.buf.format() | 		vim.lsp.buf.format() | ||||||
| 	end, | 	end, | ||||||
| }) | }) | ||||||
|  | require('lspconfig').ruff_lsp.setup { | ||||||
|  | 	init_options = { | ||||||
|  | 		settings = { | ||||||
|  | 			-- Any extra CLI arguments for `ruff` go here. | ||||||
|  | 			args = {}, | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| local on_attach = function(bufnr) | local on_attach = function(bufnr) | ||||||
| 	local function buf_set_option(...) | 	local function buf_set_option(...) | ||||||
| 		vim.api.nvim_buf_set_option(bufnr, ...) | 		vim.api.nvim_buf_set_option(bufnr, ...) | ||||||
|  | @ -258,16 +276,15 @@ vim.keymap.set("v", "<leader>r", ":<C-u>MoltenEvaluateVisual<CR>gv", | ||||||
| 	{ silent = true, desc = "evaluate visual selection" }) | 	{ silent = true, desc = "evaluate visual selection" }) | ||||||
| vim.g.molten_image_provider = "image.nvim" | vim.g.molten_image_provider = "image.nvim" | ||||||
| 
 | 
 | ||||||
| vim.keymap.set('n', '<leader>bdo', function() | local opts = { noremap = true, silent = true } | ||||||
| 	if vim.api.nvim_buf_get_option(0, "filetype") == "NvimTree" then |  | ||||||
| 		return |  | ||||||
| 	end |  | ||||||
| 
 | 
 | ||||||
| 	local bufs = vim.api.nvim_list_bufs() | local map = vim.api.nvim_set_keymap | ||||||
| 	local current_buf = vim.api.nvim_get_current_buf() | 
 | ||||||
| 	for _, i in ipairs(bufs) do | map('n', '<leader>bdo', "<Cmd>BufferCloseAllButCurrentOrPinned<CR>", opts); | ||||||
| 		if i ~= current_buf and vim.api.nvim_buf_get_option(i, "filetype") ~= "NvimTree" then | map('n', '<leader>bp', '<Cmd>BufferPin<CR>', opts) | ||||||
| 			vim.api.nvim_buf_delete(i, {}) | map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts) | ||||||
| 		end | map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts) | ||||||
| 	end | map('n', '<A-n>', '<Cmd>BufferMovePrevious<CR>', opts) | ||||||
| end, {}) | map('n', '<A-m>', '<Cmd>BufferMoveNext<CR>', opts) | ||||||
|  | map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts) | ||||||
|  | map('n', '<A-p>', '<Cmd>BufferPick<CR>', opts) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue