Initial config
This commit is contained in:
		
							
								
								
									
										9
									
								
								lsp/on_attach.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								lsp/on_attach.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| return function(client, bufnr) | ||||
|   if client.server_capabilities.inlayHintProvider then | ||||
|     local inlayhints_avail, inlayhints = pcall(require, "lsp-inlayhints") | ||||
|     if inlayhints_avail then | ||||
|       inlayhints.on_attach(client, bufnr) | ||||
|       vim.keymap.set("n", "<leader>uH", function() inlayhints.toggle() end, { desc = "Toggle inlay hints" }) | ||||
|     end | ||||
|   end | ||||
| end | ||||
							
								
								
									
										5
									
								
								lsp/server-settings/clangd.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								lsp/server-settings/clangd.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| return { | ||||
|   capabilities = { | ||||
|     offsetEncoding = "utf-8", | ||||
|   }, | ||||
| } | ||||
							
								
								
									
										15
									
								
								lsp/server-settings/rust_analyzer.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								lsp/server-settings/rust_analyzer.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| return { | ||||
|   settings = { | ||||
|     ["rust-analyzer"] = { | ||||
|       checkOnSave = { | ||||
|         command = "clippy", | ||||
|         extraArgs = { | ||||
|           "--all-features", | ||||
|           "--", | ||||
|           "-W", "clippy::pedantic", | ||||
|           "-W", "clippy::nursery", | ||||
|         }, | ||||
|       }, | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
							
								
								
									
										26
									
								
								options.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								options.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| return { | ||||
|   opt = { | ||||
|     relativenumber = true, | ||||
|     number = true, | ||||
|     spell = true, | ||||
|     signcolumn = "auto", | ||||
|     wrap = true, | ||||
|     conceallevel = 2, | ||||
|     foldenable = false, | ||||
|     foldexpr = "nvim_treesitter#foldexpr()", | ||||
|     foldmethod = "expr", | ||||
|     linebreak = true, | ||||
|     list = true, | ||||
|     listchars = { tab = " ", extends = "⟩", precedes = "⟨", trail = "·", eol = "" }, | ||||
|     showbreak = " ", | ||||
|   }, | ||||
|   g = { | ||||
|     mapleader = " ", | ||||
|     autoformat_enabled = true, | ||||
|     cmp_enabled = true, | ||||
|     autopairs_enabled = true, | ||||
|     diagnostics_enabled = true, | ||||
|     status_diagnostics_enabled = true, | ||||
|     icons_enabled = true, | ||||
|   } | ||||
| } | ||||
							
								
								
									
										19
									
								
								plugins/init.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								plugins/init.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| return { | ||||
|   ["simrat39/rust-tools.nvim"] = { | ||||
|     after = {"mason-lspconfig.nvim"}, | ||||
|     config = function() | ||||
|       require("rust-tools").setup({ | ||||
|         tools = { | ||||
|           inlay_hints = { | ||||
|             auto = false | ||||
|           } | ||||
|         }, | ||||
|         server = astronvim.lsp.server_settings "rust_analyzer", | ||||
|       }) | ||||
|     end, | ||||
|   }, | ||||
|   ["lvimuser/lsp-inlayhints.nvim"] = { | ||||
|     module = "lsp-inlayhints", | ||||
|     config = function() require "user.plugins.lsp-inlayhints" end, | ||||
|   }, | ||||
| } | ||||
							
								
								
									
										1
									
								
								plugins/lsp-inlayhints.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								plugins/lsp-inlayhints.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| require("lsp-inlayhints").setup() | ||||
							
								
								
									
										12
									
								
								updater.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								updater.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| return { | ||||
|   remote = "origin", | ||||
|   channel = "stable", | ||||
|   version = "latest", | ||||
|   branch = "main", | ||||
|   commit = nil, | ||||
|   pin_plugins = nil, | ||||
|   skip_prompts = false, | ||||
|   show_changelog = true, | ||||
|   auto_reload = true, | ||||
|   auto_quit = true, | ||||
| } | ||||
		Reference in New Issue
	
	Block a user