cleanup
This commit is contained in:
		
							parent
							
								
									064edceeff
								
							
						
					
					
						commit
						c109029807
					
				
					 3 changed files with 0 additions and 252 deletions
				
			
		
							
								
								
									
										200
									
								
								:
									
									
									
									
									
								
							
							
						
						
									
										200
									
								
								:
									
									
									
									
									
								
							|  | @ -1,200 +0,0 @@ | |||
| vim.g.mapleader = " " | ||||
| vim.opt.termguicolors = true | ||||
| vim.opt.cursorline = true | ||||
| vim.o.background = "dark" | ||||
| vim.opt.updatetime = 1000 | ||||
| vim.opt.signcolumn = "yes" | ||||
| vim.opt.colorcolumn = "80" | ||||
| vim.g.loaded_netrw = 1 | ||||
| vim.g.loaded_netrwPlugin = 1 | ||||
| vim.wo.number = true | ||||
| 
 | ||||
| local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | ||||
| if not vim.loop.fs_stat(lazypath) then | ||||
| 	vim.fn.system({ | ||||
| 		"git", | ||||
| 		"clone", | ||||
| 		"--filter=blob:none", | ||||
| 		"https://github.com/folke/lazy.nvim.git", | ||||
| 		"--branch=stable", -- latest stable release | ||||
| 		lazypath, | ||||
| 	}) | ||||
| end | ||||
| vim.opt.rtp:prepend(lazypath) | ||||
| 
 | ||||
| require("lazy").setup({ | ||||
| 	{ | ||||
| 		"amrbashir/nvim-docs-view", | ||||
| 		lazy = true, | ||||
| 		cmd = "DocsViewToggle", | ||||
| 		opts = { | ||||
| 			position = "right", | ||||
| 			width = 60, | ||||
| 			-- update_mode = "manual" | ||||
| 			update_mode = "auto" | ||||
| 		} | ||||
| 	}, | ||||
| 	{ { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" } }, | ||||
| 	{ | ||||
| 		'windwp/nvim-autopairs', | ||||
| 		event = "InsertEnter", | ||||
| 		config = true | ||||
| 		-- use opts = {} for passing setup options | ||||
| 		-- this is equalent to setup({}) function | ||||
| 	}, | ||||
| 	"hrsh7th/cmp-vsnip", | ||||
| 	"hrsh7th/vim-vsnip", | ||||
| 	"neovim/nvim-lspconfig", | ||||
| 	"terrortylor/nvim-comment", | ||||
| 	"hrsh7th/cmp-nvim-lsp", | ||||
| 	"hrsh7th/nvim-cmp", | ||||
| 	"nvim-tree/nvim-tree.lua", | ||||
| 	{ | ||||
| 		'romgrk/barbar.nvim', | ||||
| 		dependencies = { | ||||
| 			'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status | ||||
| 			'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons | ||||
| 		}, | ||||
| 		init = function() vim.g.barbar_auto_setup = false end, | ||||
| 		opts = { | ||||
| 			-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: | ||||
| 			-- animation = true, | ||||
| 			-- insert_at_start = true, | ||||
| 			-- …etc. | ||||
| 		}, | ||||
| 		version = '^1.0.0', -- optional: only update when a new 1.x version is released | ||||
| 	}, | ||||
| 	{ "ellisonleao/gruvbox.nvim" }, | ||||
| 	{ | ||||
| 		"kylechui/nvim-surround", | ||||
| 		version = "*", -- Use for stability; omit to use `main` branch for the latest features | ||||
| 		event = "VeryLazy", | ||||
| 		config = function() | ||||
| 			require("nvim-surround").setup({ | ||||
| 				-- Configuration here, or leave empty to use defaults | ||||
| 			}) | ||||
| 		end, | ||||
| 	}, | ||||
| 	{ | ||||
| 		'nvim-telescope/telescope.nvim', | ||||
| 		tag = '0.1.6', | ||||
| 		-- or                              , branch = '0.1.x', | ||||
| 		dependencies = { 'nvim-lua/plenary.nvim' } | ||||
| 	}, | ||||
| 	"lewis6991/gitsigns.nvim", | ||||
| 	{ "folke/neodev.nvim", opts = {} }, | ||||
| 	{ | ||||
| 		'nvim-lualine/lualine.nvim', | ||||
| 		dependencies = { 'nvim-tree/nvim-web-devicons' } | ||||
| 	}, | ||||
| 	{ "catppuccin/nvim",   name = "catppuccin", priority = 1000 }, | ||||
| 
 | ||||
| 
 | ||||
| }) | ||||
| 
 | ||||
| vim.cmd.colorscheme "catppuccin-mocha" | ||||
| 
 | ||||
| require('lualine').setup({}) | ||||
| 
 | ||||
| require 'nvim-treesitter.configs'.setup({ | ||||
| 	auto_install = true, | ||||
| 	highlight = { | ||||
| 		enable = true | ||||
| 	}, | ||||
| 	sync_install = false, | ||||
| 	ignore_install = {}, | ||||
| 	highlight = { | ||||
| 		enable = true, | ||||
| 	} | ||||
| 
 | ||||
| }) | ||||
| 
 | ||||
| require('gitsigns').setup() | ||||
| 
 | ||||
| local cmp = require('cmp') | ||||
| 
 | ||||
| local capabilities = require('cmp_nvim_lsp').default_capabilities() | ||||
| 
 | ||||
| cmp.setup({ | ||||
| 	sources = { | ||||
| 		{ name = 'nvim_lsp' }, | ||||
| 	}, | ||||
| 	mapping = cmp.mapping.preset.insert({ | ||||
| 		['<C-b>'] = cmp.mapping.scroll_docs(-4), | ||||
| 		['<C-f>'] = cmp.mapping.scroll_docs(4), | ||||
| 		['<C-Space>'] = cmp.mapping.complete(), | ||||
| 		['<C-e>'] = cmp.mapping.abort(), | ||||
| 		['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. | ||||
| 	}), | ||||
| 	snippet = { | ||||
| 		expand = function(args) | ||||
| 			vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. | ||||
| 		end, | ||||
| 	}, | ||||
| }) | ||||
| 
 | ||||
| require("neodev").setup({ | ||||
| 	override = function(_, library) | ||||
| 		library.enabled = true | ||||
| 		library.plugins = true | ||||
| 	end, | ||||
| }) | ||||
| 
 | ||||
| require("nvim_comment").setup() | ||||
| require("lspconfig").pyright.setup({}) | ||||
| require('lspconfig').lua_ls.setup({}) | ||||
| require("lspconfig").rust_analyzer.setup({ | ||||
| 	capabilities = capabilities | ||||
| }) | ||||
| 
 | ||||
| 
 | ||||
| vim.api.nvim_create_autocmd('BufWritePre', { | ||||
| 	callback = function(args) | ||||
| 		vim.lsp.buf.format() | ||||
| 	end, | ||||
| }) | ||||
| 
 | ||||
| local on_attach = function(bufnr) | ||||
| 	local function buf_set_option(...) | ||||
| 		vim.api.nvim_buf_set_option(bufnr, ...) | ||||
| 	end | ||||
| 
 | ||||
| 	buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') | ||||
| 
 | ||||
| 	-- Mappings. | ||||
| 	local opts = { buffer = bufnr, noremap = true, silent = true } | ||||
| 	vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) | ||||
| 	vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) | ||||
| 	vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) | ||||
| 	vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) | ||||
| 	vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts) | ||||
| 	vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts) | ||||
| 	vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts) | ||||
| 	vim.keymap.set('n', '<leader>wl', function() | ||||
| 		print(vim.inspect(vim.lsp.buf.list_workspace_folders())) | ||||
| 	end, opts) | ||||
| 	vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts) | ||||
| 	vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts) | ||||
| 	vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) | ||||
| 	vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts) | ||||
| 	vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) | ||||
| 	vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) | ||||
| 	vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts) | ||||
| 	vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, opts) | ||||
| end | ||||
| 
 | ||||
| vim.api.nvim_create_autocmd("LspAttach", { | ||||
| 	callback = function(args) | ||||
| 		local bufnr = args.buf | ||||
| 		on_attach(bufnr) | ||||
| 	end, | ||||
| }) | ||||
| 
 | ||||
| local builtin = require('telescope.builtin') | ||||
| vim.keymap.set('n', '<leader>ff', builtin.find_files, {}) | ||||
| vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) | ||||
| vim.keymap.set('n', '<leader>fb', builtin.buffers, {}) | ||||
| vim.keymap.set('n', '<leader>fh', builtin.help_tags, {}) | ||||
| 
 | ||||
| require("nvim-tree").setup() | ||||
| vim.keymap.set('n', '<leader>tt', require("nvim-tree.api").tree.toggle) | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -1,51 +0,0 @@ | |||
| { | ||||
|   "keyboard.dispatch": "keyCode", | ||||
|   "rust-analyzer.lens.implementations.enable": false, | ||||
|   "godot_tools.gdscript_lsp_server_port": 6005, | ||||
|   "terminal.integrated.profiles.linux": { | ||||
|     "bash": { | ||||
|       "path": "bash", | ||||
|       "icon": "terminal-bash", | ||||
|       "args": ["--login"] | ||||
|     } | ||||
|   }, | ||||
|   "editor.fontLigatures": true, | ||||
|   "editor.fontFamily": "FiraCode Nerd Font", | ||||
|   "git.autofetch": true, | ||||
|   "editor.formatOnSave": true, | ||||
|   "terminal.integrated.confirmOnExit": "always", | ||||
|   "[typescript]": { | ||||
|     "editor.defaultFormatter": "esbenp.prettier-vscode" | ||||
|   }, | ||||
|   "[typescriptreact]": { | ||||
|     "editor.defaultFormatter": "esbenp.prettier-vscode" | ||||
|   }, | ||||
|   "workbench.editor.enablePreview": false, | ||||
|   "diffEditor.renderSideBySide": false, | ||||
|   "files.trimTrailingWhitespace": true, | ||||
|   "files.insertFinalNewline": true, | ||||
|   "terminal.integrated.scrollback": 10000, | ||||
|   "[rust]": { | ||||
|     "editor.defaultFormatter": "rust-lang.rust-analyzer" | ||||
|   }, | ||||
|   "editor.inlayHints.enabled": "offUnlessPressed", | ||||
|   "workbench.colorTheme": "Night Coder Ash Contrast", | ||||
|   "gitdoc.autoCommitDelay": 3000, | ||||
|   "workbench.iconTheme": "catppuccin-frappe", | ||||
|   "[json]": { | ||||
|     "editor.defaultFormatter": "esbenp.prettier-vscode" | ||||
|   }, | ||||
|   "window.menuBarVisibility": "hidden", | ||||
|   "workbench.startupEditor": "none", | ||||
|   "editor.rulers": [80], | ||||
|   "[jsonc]": { | ||||
|     "editor.defaultFormatter": "esbenp.prettier-vscode" | ||||
|   }, | ||||
|   "vim.useSystemClipboard": true, | ||||
|   "python.languageServer": "None", | ||||
|   "debug.onTaskErrors": "abort", | ||||
|   "extensions.experimental.affinity": { | ||||
|     "asvetliakov.vscode-neovim": 1 | ||||
|   }, | ||||
|   "remote.autoForwardPortsSource": "hybrid" | ||||
| } | ||||
		Loading…
	
		Reference in a new issue