Compare commits
	
		
			17 Commits
		
	
	
		
			lazy
			...
			fbbd0c5512
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | fbbd0c5512 | ||
|  | 4f2c968b33 | ||
|  | 11763243dc | ||
| e777391307 | |||
|  | 9f6b6776c2 | ||
|  | 8c82f7cab4 | ||
|  | 4da8e11ada | ||
|  | ac2447ac6e | ||
|  | fd5401c9d7 | ||
|  | 1d2cd23307 | ||
|  | 40303719a2 | ||
|  | b2f02b5c13 | ||
|  | afcce108f7 | ||
|  | 46edb66356 | ||
|  | cc9fc11a62 | ||
|  | a4e6919899 | ||
| 4fc013a680 | 
							
								
								
									
										19
									
								
								.luarc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.luarc.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | { | ||||||
|  |     "workspace.library": [ | ||||||
|  |         "/Users/fschmidt/.config/nvim", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/lazy.nvim", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/cmp-nvim-lsp", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/nvim-lspconfig", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/mason.nvim", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/mason-lspconfig.nvim", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/nvim-web-devicons", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/nvim-tree.lua", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/null-ls.nvim", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/lualine.nvim", | ||||||
|  |         "/usr/local/Cellar/neovim/0.8.3/share/nvim/runtime", | ||||||
|  |         "/usr/local/Cellar/neovim/0.8.3/lib/nvim", | ||||||
|  |         "/Users/fschmidt/.local/state/nvim/lazy/readme", | ||||||
|  |         "/Users/fschmidt/.local/share/nvim/lazy/cmp-nvim-lsp/after", | ||||||
|  |         "${3rd}/luassert/library" | ||||||
|  |     ] | ||||||
|  | } | ||||||
							
								
								
									
										4
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								init.lua
									
									
									
									
									
								
							| @@ -17,7 +17,7 @@ require("maps").init() | |||||||
| require("commands") | require("commands") | ||||||
|  |  | ||||||
| vim.opt.backup = false | vim.opt.backup = false | ||||||
| vim.opt.undodir = '/Users/fschmidt/.cache/nvim/undodir' | vim.opt.undodir = os.getenv("HOME") .. '/.cache/nvim/undodir' | ||||||
| vim.opt.swapfile = false | vim.opt.swapfile = false | ||||||
| vim.opt.undofile = true | vim.opt.undofile = true | ||||||
| vim.opt.smartcase = true | vim.opt.smartcase = true | ||||||
| @@ -29,7 +29,7 @@ vim.opt.incsearch = true | |||||||
| vim.opt.scrolloff = 12 | vim.opt.scrolloff = 12 | ||||||
| vim.opt.sidescrolloff = 8 | vim.opt.sidescrolloff = 8 | ||||||
| vim.opt.mouse = 'a' | vim.opt.mouse = 'a' | ||||||
| vim.opt.autochdir = true | vim.opt.autochdir = false | ||||||
| vim.opt.clipboard = 'unnamed,unnamedplus' | vim.opt.clipboard = 'unnamed,unnamedplus' | ||||||
| vim.opt.number = true | vim.opt.number = true | ||||||
| vim.opt.wrap = false | vim.opt.wrap = false | ||||||
|   | |||||||
| @@ -1,31 +1,37 @@ | |||||||
| { | { | ||||||
|   "LuaSnip": { "branch": "master", "commit": "f7c845749aba6096f041a73a26ba64f3817bab99" }, |   "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, | ||||||
|   "bufferline.nvim": { "branch": "main", "commit": "52d6acabb79c8c0942f8873a0ca7848eb2159267" }, |   "bufferline.nvim": { "branch": "main", "commit": "2e3c8cc5a57ddd32f1edd2ffd2ccb10c09421f6c" }, | ||||||
|   "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, |   "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, | ||||||
|   "cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" }, |   "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, | ||||||
|   "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, |   "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, | ||||||
|   "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, |   "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, | ||||||
|   "cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" }, |   "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, | ||||||
|   "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, |   "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, | ||||||
|   "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, |   "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, | ||||||
|   "dashboard-nvim": { "branch": "master", "commit": "398ba8d9390c13c87a964cbca756319531fffdb7" }, |   "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, | ||||||
|   "fidget.nvim": { "branch": "main", "commit": "688b4fec4517650e29c3e63cfbb6e498b3112ba1" }, |   "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, | ||||||
|   "gitsigns.nvim": { "branch": "main", "commit": "f388995990aba04cfdc7c3ab870c33e280601109" }, |   "gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" }, | ||||||
|   "kanagawa.nvim": { "branch": "master", "commit": "4c8d48726621a7f3998c7ed35b2c2535abc22def" }, |   "kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" }, | ||||||
|   "lazy.nvim": { "branch": "main", "commit": "8077428e63feb0f3bf795d53b23ba1695b28ab0e" }, |   "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, | ||||||
|   "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, |   "lspkind-nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, | ||||||
|   "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" }, |   "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, | ||||||
|   "mason-lspconfig.nvim": { "branch": "main", "commit": "3f9c0ea157e88b08e2d11ec65002eeb6e421f0da" }, |   "lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" }, | ||||||
|   "mason.nvim": { "branch": "main", "commit": "63cff223169324a2e633954ac580c7c327182a97" }, |   "mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" }, | ||||||
|   "nvim-autopairs": { "branch": "master", "commit": "6a5faeabdbcc86cfbf1561ae430a451a72126e81" }, |   "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, | ||||||
|   "nvim-cmp": { "branch": "main", "commit": "7a3b1e76f74934b12fda82158237c6ad8bfd3d40" }, |   "nvim-autopairs": { "branch": "master", "commit": "48ca9aaee733911424646cb1605f27bc01dedbe3" }, | ||||||
|   "nvim-lspconfig": { "branch": "master", "commit": "62856b20751b748841b0f3ec5a10b1e2f6a6dbc9" }, |   "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, | ||||||
|   "nvim-tree.lua": { "branch": "master", "commit": "9c97e6449b0b0269bd44e1fd4857184dfa57bb4c" }, |   "nvim-dap": { "branch": "master", "commit": "2b428ff2632e73295e9decbcf1c40d8e26213305" }, | ||||||
|   "nvim-treesitter": { "branch": "master", "commit": "b4d8b7e5a374b800838a13aa6829ac4d542c6f1c" }, |   "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, | ||||||
|   "nvim-web-devicons": { "branch": "master", "commit": "4709a504d2cd2680fb511675e64ef2790d491d36" }, |   "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, | ||||||
|   "playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" }, |   "nvim-jdtls": { "branch": "master", "commit": "99e4b2081de1d9162666cc7b563cbeb01c26b66b" }, | ||||||
|   "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, |   "nvim-lspconfig": { "branch": "master", "commit": "a67bc39aaa4f1e13212c5022a561120846eaef27" }, | ||||||
|   "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, |   "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, | ||||||
|   "telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" }, |   "nvim-treesitter": { "branch": "master", "commit": "047ce49ccf9a2dce22e1cf3843bef3b5682a8144" }, | ||||||
|   "vimwiki": { "branch": "dev", "commit": "fea8bee382b2051b0137fd2cacf0862823ee69b3" } |   "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, | ||||||
|  |   "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, | ||||||
|  |   "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, | ||||||
|  |   "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, | ||||||
|  |   "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, | ||||||
|  |   "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, | ||||||
|  |   "vimwiki": { "branch": "dev", "commit": "705ad1e0dded0e3b7ff5fac78547ab67c9d39bdf" } | ||||||
| } | } | ||||||
| @@ -1,10 +1,37 @@ | |||||||
| -- commands.lua | -- commands.lua | ||||||
|  |  | ||||||
| vim.cmd 'autocmd! User GoyoEnter Limelight' |  | ||||||
| vim.cmd 'autocmd! User GoyoLeave Limelight!' |  | ||||||
|  |  | ||||||
| vim.cmd 'autocmd BufRead,BufNewFile *.wiki,*.md,*.tex set wrap' | vim.cmd 'autocmd BufRead,BufNewFile *.wiki,*.md,*.tex set wrap' | ||||||
|  |  | ||||||
|  | vim.cmd 'au BufRead,BufNewFile *.kdl set filetype=kdl' | ||||||
|  |  | ||||||
| vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] | vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] | ||||||
|  |  | ||||||
| vim.cmd 'command W :execute \':silent w !sudo tee % > /dev/null\' | :edit!' | vim.cmd 'command W :execute \':silent w !sudo tee % > /dev/null\' | :edit!' | ||||||
|  |  | ||||||
|  | -- Array of file names indicating root directory. Modify to your liking. | ||||||
|  | local root_names = { '.git', 'Makefile' } | ||||||
|  |  | ||||||
|  | -- Cache to use for speed up (at cost of possibly outdated results) | ||||||
|  | local root_cache = {} | ||||||
|  |  | ||||||
|  | local set_root = function() | ||||||
|  | 	-- Get directory path to start search from | ||||||
|  | 	local path = vim.api.nvim_buf_get_name(0) | ||||||
|  | 	if path == '' then return end | ||||||
|  | 	path = vim.fs.dirname(path) | ||||||
|  |  | ||||||
|  | 	-- Try cache and resort to searching upward for root directory | ||||||
|  | 	local root = root_cache[path] | ||||||
|  | 	if root == nil then | ||||||
|  | 		local root_file = vim.fs.find(root_names, { path = path, upward = true })[1] | ||||||
|  | 		if root_file == nil then return end | ||||||
|  | 		root = vim.fs.dirname(root_file) | ||||||
|  | 		root_cache[path] = root | ||||||
|  | 	end | ||||||
|  |  | ||||||
|  | 	-- Set current directory | ||||||
|  | 	vim.fn.chdir(root) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | local root_augroup = vim.api.nvim_create_augroup('MyAutoRoot', {}) | ||||||
|  | vim.api.nvim_create_autocmd('BufEnter', { group = root_augroup, callback = set_root }) | ||||||
|   | |||||||
| @@ -8,10 +8,6 @@ local function map(mode, lhs, rhs, opts) | |||||||
| 	vim.api.nvim_set_keymap(mode, lhs, rhs, options) | 	vim.api.nvim_set_keymap(mode, lhs, rhs, options) | ||||||
| end | end | ||||||
|  |  | ||||||
| function maps.toggleGoyo() |  | ||||||
| 	map('n', '<C-g>', ':Goyo<Enter>', { noremap = false }) |  | ||||||
| end |  | ||||||
|  |  | ||||||
| function maps.term() | function maps.term() | ||||||
| 	-- Open and move to resized terminal | 	-- Open and move to resized terminal | ||||||
| 	map('n', '<leader>t', '<C-w>s<C-w>j :terminal<CR>:res 5<CR>i', { noremap = false }) | 	map('n', '<leader>t', '<C-w>s<C-w>j :terminal<CR>:res 5<CR>i', { noremap = false }) | ||||||
| @@ -45,10 +41,10 @@ end | |||||||
| function maps.init() | function maps.init() | ||||||
| 	vim.g.mapleader = " " | 	vim.g.mapleader = " " | ||||||
|  |  | ||||||
| 	map('n', '<leader>b', '<cmd>NvimTreeToggle<CR>') | 	-- map('n', '<leader>b', '<cmd>NvimTreeToggle<CR>') | ||||||
|  | 	map('n', '<leader>b', '<cmd>Lexplore | vert res 30<CR>') | ||||||
| 	map('n', '<leader>cc', '<cmd>Telescope colorscheme<CR>') | 	map('n', '<leader>cc', '<cmd>Telescope colorscheme<CR>') | ||||||
|  |  | ||||||
| 	maps.toggleGoyo() |  | ||||||
| 	maps.term() | 	maps.term() | ||||||
| 	maps.telescope() | 	maps.telescope() | ||||||
| 	maps.fixIndent() | 	maps.fixIndent() | ||||||
|   | |||||||
							
								
								
									
										17
									
								
								lua/plugins/dap.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								lua/plugins/dap.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | return { | ||||||
|  | 	{ | ||||||
|  | 		'mfussenegger/nvim-dap', | ||||||
|  | 		dependencies = { 'nvim-lua/plenary.nvim' } | ||||||
|  | 	}, | ||||||
|  | 	{ | ||||||
|  | 		'rcarriga/nvim-dap-ui', | ||||||
|  | 		config = function() | ||||||
|  | 			require("dapui").setup() | ||||||
|  | 		end, | ||||||
|  | 		dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' } | ||||||
|  | 	}, | ||||||
|  | 	{ | ||||||
|  | 		'theHamsta/nvim-dap-virtual-text', | ||||||
|  | 		config = true | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -8,6 +8,8 @@ local lsp_attach = function(client, buf) | |||||||
| 	vim.api.nvim_buf_set_option(buf, "omnifunc", "v:lua.vim.lsp.omnifunc") | 	vim.api.nvim_buf_set_option(buf, "omnifunc", "v:lua.vim.lsp.omnifunc") | ||||||
| 	vim.api.nvim_buf_set_option(buf, "tagfunc", "v:lua.vim.lsp.tagfunc") | 	vim.api.nvim_buf_set_option(buf, "tagfunc", "v:lua.vim.lsp.tagfunc") | ||||||
|  |  | ||||||
|  | 	vim.lsp.inlay_hint.enable(true, nil) | ||||||
|  |  | ||||||
| 	local bufopts = { noremap = true, silent = true, buffer = buf } | 	local bufopts = { noremap = true, silent = true, buffer = buf } | ||||||
| 	vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) | 	vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) | ||||||
| 	vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) | 	vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) | ||||||
| @@ -20,6 +22,14 @@ local lsp_attach = function(client, buf) | |||||||
| 	vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) | 	vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) | ||||||
| end | end | ||||||
|  |  | ||||||
|  | local mason_path = vim.fn.glob(vim.fn.stdpath "data" .. "/mason/packages/codelldb/extension/") | ||||||
|  | local codelldb_path = mason_path .. "adapter/codelldb" | ||||||
|  | local liblldb_path = mason_path .. "lldb/lib/liblldb.so" | ||||||
|  |  | ||||||
|  | if vim.fn.has "mac" == 1 then | ||||||
|  | 	liblldb_path = mason_path .. "lldb/lib/liblldb.dylib" | ||||||
|  | end | ||||||
|  |  | ||||||
| return { | return { | ||||||
| 	-- lsp | 	-- lsp | ||||||
| 	{ | 	{ | ||||||
| @@ -38,11 +48,22 @@ return { | |||||||
|  |  | ||||||
| 			lspconfig.lua_ls.setup { | 			lspconfig.lua_ls.setup { | ||||||
| 				capabilities = capabilities, | 				capabilities = capabilities, | ||||||
|  | 				root_dir = lspconfig.util.root_pattern('.git'), | ||||||
| 				settings = { | 				settings = { | ||||||
| 					Lua = { | 					Lua = { | ||||||
|  | 						runtime = { | ||||||
|  | 							-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) | ||||||
|  | 							version = 'LuaJIT', | ||||||
|  | 						}, | ||||||
| 						diagnostics = { | 						diagnostics = { | ||||||
|  | 							-- Get the language server to recognize the `vim` global | ||||||
| 							globals = { 'vim' } | 							globals = { 'vim' } | ||||||
| 						} | 						}, | ||||||
|  | 						workspace = { | ||||||
|  | 							-- Make the server aware of Neovim runtime files | ||||||
|  | 							library = vim.api.nvim_get_runtime_file("", true), | ||||||
|  | 							checkThirdParty = false, | ||||||
|  | 						}, | ||||||
| 					} | 					} | ||||||
| 				}, | 				}, | ||||||
| 				on_attach = lsp_attach | 				on_attach = lsp_attach | ||||||
| @@ -59,13 +80,6 @@ return { | |||||||
| 			--	capabilities = capabilities, | 			--	capabilities = capabilities, | ||||||
| 			--	on_attach = lsp_attach | 			--	on_attach = lsp_attach | ||||||
| 			--} | 			--} | ||||||
| 			require("rust-tools").setup({ |  | ||||||
| 				server = { |  | ||||||
| 					capabilities = capabilities, |  | ||||||
| 					on_attach = lsp_attach, |  | ||||||
| 					standalone = false |  | ||||||
| 				} |  | ||||||
| 			}) |  | ||||||
| 			lspconfig.bashls.setup { | 			lspconfig.bashls.setup { | ||||||
| 				capabilities = capabilities, | 				capabilities = capabilities, | ||||||
| 				on_attach = lsp_attach | 				on_attach = lsp_attach | ||||||
| @@ -86,6 +100,10 @@ return { | |||||||
| 				capabilities = capabilities, | 				capabilities = capabilities, | ||||||
| 				on_attach = lsp_attach | 				on_attach = lsp_attach | ||||||
| 			}) | 			}) | ||||||
|  | 			lspconfig.phpactor.setup({ | ||||||
|  | 				capabilities = capabilities, | ||||||
|  | 				on_attach = lsp_attach | ||||||
|  | 			}) | ||||||
| 			capabilities.textDocument.completion.completionItem.snippetSupport = true | 			capabilities.textDocument.completion.completionItem.snippetSupport = true | ||||||
| 			lspconfig.emmet_ls.setup({ | 			lspconfig.emmet_ls.setup({ | ||||||
| 				capabilities = capabilities, | 				capabilities = capabilities, | ||||||
| @@ -93,9 +111,181 @@ return { | |||||||
| 			}) | 			}) | ||||||
| 		end | 		end | ||||||
| 	}, | 	}, | ||||||
| 	{ 'simrat39/rust-tools.nvim' }, | 	{ | ||||||
|  | 		'mrcjkb/rustaceanvim', | ||||||
|  | 		version = "^4", | ||||||
|  | 		lazy = false, | ||||||
|  | 		ft = { "rust" }, | ||||||
|  | 		config = function() | ||||||
|  | 			vim.g.rustaceanvim = { | ||||||
|  | 				server = { | ||||||
|  | 					on_attach = lsp_attach, | ||||||
|  | 					settings = { | ||||||
|  | 						-- rust-analyzer language server configuration | ||||||
|  | 						["rust-analyzer"] = { | ||||||
|  | 							rustfmt = { | ||||||
|  | 								extraArgs = { "+nightly" }, | ||||||
|  | 							}, | ||||||
|  | 							cargo = { | ||||||
|  | 								allFeatures = true, | ||||||
|  | 								loadOutDirsFromCheck = true, | ||||||
|  | 								runBuildScripts = true, | ||||||
|  | 							}, | ||||||
|  | 							-- Add clippy lints for Rust. | ||||||
|  | 							checkOnSave = { | ||||||
|  | 								allFeatures = true, | ||||||
|  | 								command = "clippy", | ||||||
|  | 								extraArgs = { "--no-deps" }, | ||||||
|  | 							}, | ||||||
|  | 							-- TODO this breaks diagnostics, look into what can be done | ||||||
|  | 							-- procMacro = { | ||||||
|  | 							-- 	enable = true, | ||||||
|  | 							-- 	ignored = { | ||||||
|  | 							-- 		["async-trait"] = { "async_trait" }, | ||||||
|  | 							-- 		["napi-derive"] = { "napi" }, | ||||||
|  | 							-- 		["async-recursion"] = { "async_recursion" }, | ||||||
|  | 							-- 	}, | ||||||
|  | 							-- }, | ||||||
|  | 						}, | ||||||
|  | 					}, | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		end | ||||||
|  | 	}, | ||||||
|  | 	{ | ||||||
|  | 		'mfussenegger/nvim-jdtls', | ||||||
|  | 		ft = { "java" }, | ||||||
|  | 		config = function() | ||||||
|  | 			local home = os.getenv('HOME') | ||||||
|  | 			local jdtls = require('jdtls') | ||||||
|  | 			local capabilities = require('cmp_nvim_lsp').default_capabilities() | ||||||
|  | 			local root_markers = { 'gradlew', 'mvnw', 'git' } | ||||||
|  | 			local root_dir = require('jdtls.setup').find_root(root_markers) | ||||||
|  | 			local workspace_folder = home .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t") | ||||||
|  | 			local config = { | ||||||
|  | 				flags = { | ||||||
|  | 					debounce_text_changes = 80, | ||||||
|  | 				}, | ||||||
|  | 				capabilities = capabilities, | ||||||
|  | 				on_attach = lsp_attach, -- We pass our on_attach keybindings to the configuration map | ||||||
|  | 				root_dir = root_dir, -- Set the root directory to our found root_marker | ||||||
|  | 				-- here you can configure eclipse.jdt.ls specific settings | ||||||
|  | 				-- these are defined by the eclipse.jdt.ls project and will be passed to eclipse when starting. | ||||||
|  | 				-- see https://github.com/eclipse/eclipse.jdt.ls/wiki/running-the-java-ls-server-from-the-command-line#initialize-request | ||||||
|  | 				-- for a list of options | ||||||
|  | 				settings = { | ||||||
|  | 					java = { | ||||||
|  | 						format = { | ||||||
|  | 							settings = { | ||||||
|  | 								-- use google java style guidelines for formatting | ||||||
|  | 								-- to use, make sure to download the file from https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml | ||||||
|  | 								-- and place it in the ~/.local/share/eclipse directory | ||||||
|  | 								-- url = "/.local/share/eclipse/eclipse-java-google-style.xml", | ||||||
|  | 								-- profile = "googlestyle", | ||||||
|  | 							}, | ||||||
|  | 						}, | ||||||
|  | 						signaturehelp = { enabled = true }, | ||||||
|  | 						contentprovider = { preferred = 'fernflower' }, -- use fernflower to decompile library code | ||||||
|  | 						-- specify any completion options | ||||||
|  | 						completion = { | ||||||
|  | 							favoritestaticmembers = { | ||||||
|  | 								-- "org.hamcrest.matcherassert.assertthat", | ||||||
|  | 								-- "org.hamcrest.matchers.*", | ||||||
|  | 								-- "org.hamcrest.corematchers.*", | ||||||
|  | 								-- "org.junit.jupiter.api.assertions.*", | ||||||
|  | 								-- "java.util.objects.requirenonnull", | ||||||
|  | 								-- "java.util.objects.requirenonnullelse", | ||||||
|  | 								-- "org.mockito.mockito.*" | ||||||
|  | 							}, | ||||||
|  | 							filteredtypes = { | ||||||
|  | 								-- "com.sun.*", | ||||||
|  | 								-- "io.micrometer.shaded.*", | ||||||
|  | 								-- "java.awt.*", | ||||||
|  | 								-- "jdk.*", "sun.*", | ||||||
|  | 							}, | ||||||
|  | 						}, | ||||||
|  | 						-- specify any options for organizing imports | ||||||
|  | 						sources = { | ||||||
|  | 							organizeimports = { | ||||||
|  | 								starthreshold = 9999, | ||||||
|  | 								staticstarthreshold = 9999, | ||||||
|  | 							}, | ||||||
|  | 						}, | ||||||
|  | 						-- how code generation should act | ||||||
|  | 						codegeneration = { | ||||||
|  | 							tostring = { | ||||||
|  | 								template = "${object.classname}{${member.name()}=${member.value}, ${othermembers}}" | ||||||
|  | 							}, | ||||||
|  | 							hashcodeequals = { | ||||||
|  | 								usejava7objects = true, | ||||||
|  | 							}, | ||||||
|  | 							useblocks = true, | ||||||
|  | 						}, | ||||||
|  | 						-- if you are developing in projects with different java versions, you need | ||||||
|  | 						-- to tell eclipse.jdt.ls to use the location of the jdk for your java version | ||||||
|  | 						-- see https://github.com/eclipse/eclipse.jdt.ls/wiki/running-the-java-ls-server-from-the-command-line#initialize-request | ||||||
|  | 						-- and search for `interface runtimeoption` | ||||||
|  | 						-- the `name` is not arbitrary, but must match one of the elements from `enum executionenvironment` in the link above | ||||||
|  | 						configuration = { | ||||||
|  | 							runtimes = { | ||||||
|  | 								{ | ||||||
|  | 									name = "JavaSE-17", | ||||||
|  | 									path = home .. "/.local/share/asdf/installs/java/oracle-17.0.11/", | ||||||
|  | 								}, | ||||||
|  | 								{ | ||||||
|  | 									name = "JavaSE-21", | ||||||
|  | 									path = home .. "/.local/share/asdf/installs/java/oracle-21.0.2/", | ||||||
|  | 								}, | ||||||
|  | 								{ | ||||||
|  | 									name = "JavaSE-1.8", | ||||||
|  | 									path = home .. "/.local/share/asdf/installs/java/adoptopenjdk-8.0.412+8/" | ||||||
|  | 								}, | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				}, | ||||||
|  | 				-- cmd is the command that starts the language server. whatever is placed | ||||||
|  | 				-- here is what is passed to the command line to execute jdtls. | ||||||
|  | 				-- note that eclipse.jdt.ls must be started with a java version of 17 or higher | ||||||
|  | 				-- see: https://github.com/eclipse/eclipse.jdt.ls#running-from-the-command-line | ||||||
|  | 				-- for the full list of options | ||||||
|  | 				cmd = { | ||||||
|  | 					home .. "/.local/share/asdf/installs/java/oracle-21.0.2/bin/java", | ||||||
|  | 					'-Declipse.application=org.eclipse.jdt.ls.core.id1', | ||||||
|  | 					'-Dosgi.bundles.defaultstartlevel=4', | ||||||
|  | 					'-Declipse.product=org.eclipse.jdt.ls.core.product', | ||||||
|  | 					'-Dlog.protocol=true', | ||||||
|  | 					'-Dlog.level=all', | ||||||
|  | 					'-Xmx4G', | ||||||
|  | 					'--add-modules=ALL-SYSTEM', | ||||||
|  | 					'--add-opens', 'java.base/java.util=ALL-UNNAMED', | ||||||
|  | 					'--add-opens', 'java.base/java.lang=ALL-UNNAMED', | ||||||
|  | 					-- if you use lombok, download the lombok jar and place it in ~/.local/share/eclipse | ||||||
|  | 					'-javaagent:' .. home .. '/.local/share/nvim/mason/packages/jdtls/lombok.jar', | ||||||
|  |  | ||||||
|  | 					-- the jar file is located where jdtls was installed. this will need to be updated | ||||||
|  | 					-- to the location where you installed jdtls | ||||||
|  | 					'-jar', vim.fn.glob( | ||||||
|  | 					home .. | ||||||
|  | 					'/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_*.jar'), | ||||||
|  |  | ||||||
|  | 					-- the configuration for jdtls is also placed where jdtls was installed. this will | ||||||
|  | 					-- need to be updated depending on your environment | ||||||
|  | 					'-configuration', home .. '/.local/share/nvim/mason/packages/jdtls/config_linux', | ||||||
|  |  | ||||||
|  | 					-- use the workspace_folder defined above to store data for this project | ||||||
|  | 					'-data', workspace_folder, | ||||||
|  | 				}, | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			jdtls.start_or_attach(config) | ||||||
|  | 		end | ||||||
|  | 	}, | ||||||
| 	{ 'onsails/lspkind-nvim' }, -- pictograms replace (?) with lspsaga | 	{ 'onsails/lspkind-nvim' }, -- pictograms replace (?) with lspsaga | ||||||
| 	{ 'j-hui/fidget.nvim' }, -- show lsp status | 	{ | ||||||
|  | 		'j-hui/fidget.nvim', | ||||||
|  | 		config = true | ||||||
|  | 	}, -- show lsp status | ||||||
| 	-- completion | 	-- completion | ||||||
| 	{ | 	{ | ||||||
| 		'hrsh7th/nvim-cmp', | 		'hrsh7th/nvim-cmp', | ||||||
| @@ -133,8 +323,8 @@ return { | |||||||
| 					{ name = 'path' }, | 					{ name = 'path' }, | ||||||
| 					{ name = 'luasnip' }, | 					{ name = 'luasnip' }, | ||||||
| 					{ name = 'nvim_lsp_signature_help' }, | 					{ name = 'nvim_lsp_signature_help' }, | ||||||
| 					}, { | 				}, { | ||||||
| 						{ name = 'buffer', keyword_length = 5 }, | 					{ name = 'buffer', keyword_length = 5 }, | ||||||
| 				}), | 				}), | ||||||
| 				formatting = { | 				formatting = { | ||||||
| 					format = lspkind.cmp_format { | 					format = lspkind.cmp_format { | ||||||
| @@ -161,8 +351,8 @@ return { | |||||||
| 			cmp.setup.cmdline(':', { | 			cmp.setup.cmdline(':', { | ||||||
| 				sources = cmp.config.sources({ | 				sources = cmp.config.sources({ | ||||||
| 					{ name = 'path' } | 					{ name = 'path' } | ||||||
| 					}, { | 				}, { | ||||||
| 						{ name = 'cmdline' } | 					{ name = 'cmdline' } | ||||||
| 				}) | 				}) | ||||||
| 			}) | 			}) | ||||||
| 		end, | 		end, | ||||||
| @@ -179,6 +369,8 @@ return { | |||||||
| 	}, | 	}, | ||||||
| 	{ | 	{ | ||||||
| 		'L3MON4D3/LuaSnip', | 		'L3MON4D3/LuaSnip', | ||||||
|  | 		version = "v2.*", | ||||||
|  | 		build = "make install_jsregexp", | ||||||
| 		config = function() | 		config = function() | ||||||
| 			require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets/" }) | 			require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets/" }) | ||||||
| 		end | 		end | ||||||
| @@ -187,6 +379,13 @@ return { | |||||||
| 		'windwp/nvim-autopairs', | 		'windwp/nvim-autopairs', | ||||||
| 		config = true | 		config = true | ||||||
| 	}, | 	}, | ||||||
|  | 	{ | ||||||
|  | 		"folke/trouble.nvim", | ||||||
|  | 		dependencies = { "nvim-tree/nvim-web-devicons" }, | ||||||
|  | 		opts = { | ||||||
|  | 			-- your configuration comes here | ||||||
|  | 			-- or leave it empty to use the default settings | ||||||
|  | 			-- refer to the configuration section below | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
| } | } | ||||||
| --	-- Linting & formtatting |  | ||||||
| --	'jose-elias-alvarez/null-ls.nvim'; |  | ||||||
|   | |||||||
| @@ -1,67 +1,20 @@ | |||||||
| return { | return { | ||||||
| 	{ | 	{ | ||||||
| 		'nvim-telescope/telescope.nvim', | 		'nvim-telescope/telescope.nvim', | ||||||
| 		tag = '0.1.1', | 		version = '0.1.*', | ||||||
| 		dependencies = { 'nvim-lua/plenary.nvim' }, | 		dependencies = { 'nvim-lua/plenary.nvim' }, | ||||||
| 	}, | 	}, | ||||||
| 	{ | 	-- Don't really need it. Nicer than the default but that's it | ||||||
| 		'nvim-tree/nvim-tree.lua', | 	-- { | ||||||
| 		config = function() | 	-- 	'nvim-tree/nvim-tree.lua', | ||||||
| 			require('nvim-tree').setup { | 	-- 	config = function() | ||||||
| 				disable_netrw       = true, | 	-- 		require('nvim-tree').setup { | ||||||
| 				hijack_netrw        = true, | 	-- 			view = { | ||||||
| 				open_on_setup       = false, | 	-- 				width = 30, | ||||||
| 				ignore_ft_on_setup  = {}, | 	-- 				side = 'left', | ||||||
| 				open_on_tab         = false, | 	-- 			}, | ||||||
| 				hijack_cursor       = false, | 	-- 		} | ||||||
| 				update_cwd          = true, | 	-- 	end, | ||||||
| 				hijack_directories  = { | 	-- 	dependencies = { 'nvim-tree/nvim-web-devicons' } | ||||||
| 					enable = true, | 	-- } | ||||||
| 					auto_open = true, |  | ||||||
| 				}, |  | ||||||
| 				diagnostics         = { |  | ||||||
| 					enable = false, |  | ||||||
| 					icons = { |  | ||||||
| 						hint = "", |  | ||||||
| 						info = "", |  | ||||||
| 						warning = "", |  | ||||||
| 						error = "", |  | ||||||
| 					} |  | ||||||
| 				}, |  | ||||||
| 				update_focused_file = { |  | ||||||
| 					enable      = false, |  | ||||||
| 					update_cwd  = false, |  | ||||||
| 					ignore_list = {} |  | ||||||
| 				}, |  | ||||||
| 				system_open         = { |  | ||||||
| 					cmd  = nil, |  | ||||||
| 					args = {} |  | ||||||
| 				}, |  | ||||||
| 				filters             = { |  | ||||||
| 					dotfiles = false, |  | ||||||
| 					custom = {} |  | ||||||
| 				}, |  | ||||||
| 				git                 = { |  | ||||||
| 					enable = true, |  | ||||||
| 					ignore = true, |  | ||||||
| 					timeout = 500, |  | ||||||
| 				}, |  | ||||||
| 				view                = { |  | ||||||
| 					width = 30, |  | ||||||
| 					hide_root_folder = false, |  | ||||||
| 					side = 'left', |  | ||||||
| 					mappings = { |  | ||||||
| 						custom_only = false, |  | ||||||
| 						list = {} |  | ||||||
| 					} |  | ||||||
| 				}, |  | ||||||
| 				actions             = { |  | ||||||
| 					open_file = { |  | ||||||
| 						resize_window = false |  | ||||||
| 					} |  | ||||||
| 				} |  | ||||||
| 			} |  | ||||||
| 		end, |  | ||||||
| 		dependencies = { 'nvim-tree/nvim-web-devicons' } |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -3,12 +3,25 @@ return { | |||||||
| 		'rebelot/kanagawa.nvim', | 		'rebelot/kanagawa.nvim', | ||||||
| 		config = function() | 		config = function() | ||||||
| 			vim.opt.guifont = 'Source Code Pro for Powerline' | 			vim.opt.guifont = 'Source Code Pro for Powerline' | ||||||
| 			vim.g.limelight_conceal_ctermfg = 'gray' |  | ||||||
| 			vim.cmd('colorscheme kanagawa') |  | ||||||
| 			vim.cmd('set termguicolors') | 			vim.cmd('set termguicolors') | ||||||
| 			vim.opt.syntax = 'on' | 			vim.opt.syntax = 'on' | ||||||
|  | 			require('kanagawa').setup({ | ||||||
|  | 				colors = { | ||||||
|  | 					palette = { | ||||||
|  | 						lotusGray = "#F8F7F4", | ||||||
|  | 						lotusWhite0 = "#FBFBF9", | ||||||
|  | 						lotusWhite1 = "#F2F0E9", | ||||||
|  | 						lotusWhite2 = "#F8F7F2", | ||||||
|  | 						lotusWhite3 = "#F6F6F1", | ||||||
|  | 						lotusWhite4 = "#F4F1E6", | ||||||
|  | 						lotusWhite5 = "#FcFBF9", | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			}) | ||||||
|  | 			vim.cmd('colorscheme kanagawa-lotus') | ||||||
| 		end | 		end | ||||||
| 	}, | 	}, | ||||||
|  | 	{ 'lunarvim/lunar.nvim' }, | ||||||
| 	{ | 	{ | ||||||
| 		'nvim-treesitter/nvim-treesitter', | 		'nvim-treesitter/nvim-treesitter', | ||||||
| 		build = ':TSUpdate', | 		build = ':TSUpdate', | ||||||
| @@ -28,7 +41,7 @@ return { | |||||||
| 	}, | 	}, | ||||||
| 	{ | 	{ | ||||||
| 		'akinsho/bufferline.nvim', | 		'akinsho/bufferline.nvim', | ||||||
| 		tag = "v3.3.0", | 		version = "*", | ||||||
| 		config = true, | 		config = true, | ||||||
| 		dependencies = { 'nvim-tree/nvim-web-devicons' } | 		dependencies = { 'nvim-tree/nvim-web-devicons' } | ||||||
| 	}, | 	}, | ||||||
| @@ -42,7 +55,10 @@ return { | |||||||
| 			} | 			} | ||||||
| 		end | 		end | ||||||
| 	}, | 	}, | ||||||
| 	{ 'lewis6991/gitsigns.nvim' }, | 	{ | ||||||
|  | 		'lewis6991/gitsigns.nvim', | ||||||
|  | 		config = true | ||||||
|  | 	}, | ||||||
| 	{ | 	{ | ||||||
| 		'glepnir/dashboard-nvim', | 		'glepnir/dashboard-nvim', | ||||||
| 		event = 'VimEnter', | 		event = 'VimEnter', | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user