wip
This commit is contained in:
		| @@ -47,15 +47,15 @@ vim.lsp.config("lua_ls", { | ||||
| 	}, | ||||
| }) | ||||
|  | ||||
| vim.lsp.config("rust_analyzer", { | ||||
| 	settings = { | ||||
| 		["rust-analyzer"] = { | ||||
| 			checkOnSave = { | ||||
| 				command = "clippy", | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| }) | ||||
| -- vim.lsp.config("rust_analyzer", { | ||||
| -- 	settings = { | ||||
| -- 		["rust-analyzer"] = { | ||||
| -- 			checkOnSave = { | ||||
| -- 				command = "clippy", | ||||
| -- 			}, | ||||
| -- 		}, | ||||
| -- 	}, | ||||
| -- }) | ||||
|  | ||||
| vim.api.nvim_create_autocmd("LspAttach", { | ||||
| 	callback = function(ev) | ||||
| @@ -66,18 +66,21 @@ vim.api.nvim_create_autocmd("LspAttach", { | ||||
| 		vim.keymap.set("n", "K", function() | ||||
| 			vim.lsp.buf.hover() | ||||
| 		end, opts) | ||||
| 		vim.keymap.set("n", "<leader>vd", function() | ||||
| 		vim.keymap.set("n", "<leader>ad", function() | ||||
| 			vim.diagnostic.open_float() | ||||
| 		end, opts) | ||||
| 		vim.keymap.set("n", "<leader>vrr", function() | ||||
| 		vim.keymap.set("n", "<leader>af", function() | ||||
| 			vim.lsp.buf.references() | ||||
| 		end, opts) | ||||
| 		vim.keymap.set("n", "<leader>vca", function() | ||||
| 		vim.keymap.set("n", "<leader>a.", function() | ||||
| 			vim.lsp.buf.code_action() | ||||
| 		end, opts) | ||||
| 		vim.keymap.set("n", "<leader>vrn", function() | ||||
| 		vim.keymap.set("n", "<leader>ar", function() | ||||
| 			vim.lsp.buf.rename() | ||||
| 		end, opts) | ||||
| 		vim.keymap.set("n", "<leader>an", function() | ||||
| 			vim.cmd.RustLsp("run") | ||||
| 		end, opts) | ||||
| 		vim.keymap.set("n", "<leader>ii", function() | ||||
| 			vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) | ||||
| 		end, opts) | ||||
|   | ||||
| @@ -1,7 +1,8 @@ | ||||
| local builtin = require('telescope.builtin') | ||||
| vim.keymap.set('n', '<leader>pf', builtin.find_files, { desc = 'Telescope find files' }) | ||||
| vim.keymap.set('n', '<C-p>', builtin.git_files, {}) | ||||
| vim.keymap.set('n', '<leader>ps', function() | ||||
|     -- builtin.grep_string({ search = vim.fn.input("Grep > ") }) | ||||
|     builtin.live_grep() | ||||
| local builtin = require("telescope.builtin") | ||||
| vim.keymap.set("n", "<leader>pf", builtin.find_files, { desc = "Telescope find files" }) | ||||
| vim.keymap.set("n", "<leader>pt", builtin.lsp_workspace_symbols, { desc = "Telescope find type definitions" }) | ||||
| vim.keymap.set("n", "<C-p>", builtin.git_files, {}) | ||||
| vim.keymap.set("n", "<leader>ps", function() | ||||
| 	-- builtin.grep_string({ search = vim.fn.input("Grep > ") }) | ||||
| 	builtin.live_grep() | ||||
| end) | ||||
|   | ||||
| @@ -1,34 +1,36 @@ | ||||
| { | ||||
|   "auto-session": { "branch": "main", "commit": "00334ee24b9a05001ad50221c8daffbeedaa0842" }, | ||||
|   "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, | ||||
|   "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, | ||||
|   "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, | ||||
|   "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, | ||||
|   "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, | ||||
|   "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, | ||||
|   "conform.nvim": { "branch": "master", "commit": "a4bb5d6c4ae6f32ab13114e62e70669fa67745b9" }, | ||||
|   "conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" }, | ||||
|   "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, | ||||
|   "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, | ||||
|   "mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" }, | ||||
|   "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, | ||||
|   "mason-lspconfig.nvim": { "branch": "main", "commit": "67da97f8c2fd12d05427bb485ce07ee6418e0a51" }, | ||||
|   "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, | ||||
|   "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, | ||||
|   "mason.nvim": { "branch": "main", "commit": "888d6ee499d8089a3a4be4309d239d6be1c1e6c0" }, | ||||
|   "none-ls.nvim": { "branch": "main", "commit": "90e4a27ccaa25979a6b732b9f06dfa43b54957b7" }, | ||||
|   "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, | ||||
|   "none-ls.nvim": { "branch": "main", "commit": "db2a48b79cfcdab8baa5d3f37f21c78b6705c62e" }, | ||||
|   "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" }, | ||||
|   "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, | ||||
|   "nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" }, | ||||
|   "nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" }, | ||||
|   "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, | ||||
|   "nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" }, | ||||
|   "nvim-lspconfig": { "branch": "master", "commit": "b8e7957bde4cbb3cb25a13a62548f7c273b026e9" }, | ||||
|   "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, | ||||
|   "nvim-tree.lua": { "branch": "master", "commit": "be5b788f2dc1522c73fb7afad9092331c8aebe80" }, | ||||
|   "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }, | ||||
|   "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, | ||||
|   "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, | ||||
|   "outline.nvim": { "branch": "main", "commit": "321f89ef79f168a78685f70d70c52d0e7b563abb" }, | ||||
|   "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, | ||||
|   "rustaceanvim": { "branch": "master", "commit": "5120207f90846704a74cbf043295698b009bd5de" }, | ||||
|   "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, | ||||
|   "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, | ||||
|   "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, | ||||
|   "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, | ||||
|   "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, | ||||
|   "vim-vsnip": { "branch": "master", "commit": "0a4b8419e44f47c57eec4c90df17567ad4b1b36e" }, | ||||
|   "vscode.nvim": { "branch": "main", "commit": "57cec1509bfb57dfc3c4d5ba5e8db9a5b5e42be2" } | ||||
|   "vscode.nvim": { "branch": "main", "commit": "57cec1509bfb57dfc3c4d5ba5e8db9a5b5e42be2" }, | ||||
|   "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } | ||||
| } | ||||
|   | ||||
| @@ -1,3 +1,4 @@ | ||||
| vim.g.mapleader = " " | ||||
| vim.keymap.set("n", "<leader>pv", vim.cmd.NvimTreeToggle) | ||||
| vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", { silent = true }) | ||||
| vim.keymap.set("i", "jj", "<Esc>", { noremap = true }) | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| vim.opt.guicursor = "" | ||||
|  | ||||
| vim.opt.nu = true | ||||
| vim.opt.relativenumber = true | ||||
|  | ||||
| vim.opt.tabstop = 4 | ||||
| vim.opt.softtabstop = 4 | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| local function config_lsp() | ||||
| 	vim.lsp.enable("rust_analyzer") | ||||
| 	-- vim.lsp.enable("rust_analyzer") | ||||
| end | ||||
|  | ||||
| return { | ||||
| @@ -139,4 +139,9 @@ return { | ||||
| 		dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, | ||||
| 		opts = {}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"mrcjkb/rustaceanvim", | ||||
| 		version = "^6", -- Recommended | ||||
| 		lazy = false, -- This plugin is already lazy | ||||
| 	}, | ||||
| } | ||||
|   | ||||
| @@ -23,6 +23,19 @@ return { | ||||
| 			filters = { | ||||
| 				dotfiles = true, | ||||
| 			}, | ||||
| 			renderer = { | ||||
| 				indent_markers = { enable = true }, | ||||
| 				icons = { | ||||
| 					show = { | ||||
| 						file = false, | ||||
| 					}, | ||||
| 					glyphs = { | ||||
| 						git = { | ||||
| 							unstaged = "", | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| @@ -74,4 +87,18 @@ return { | ||||
| 			open_mapping = "<leader>ot", | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"folke/which-key.nvim", | ||||
| 		event = "VeryLazy", | ||||
| 		opts = {}, | ||||
| 		keys = { | ||||
| 			{ | ||||
| 				"<leader>?", | ||||
| 				function() | ||||
| 					require("which-key").show({ global = false }) | ||||
| 				end, | ||||
| 				desc = "Buffer Local Keymaps (which-key)", | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user