diff --git a/lsp/config/clangd.lua b/lsp/config/clangd.lua deleted file mode 100644 index d3ae464..0000000 --- a/lsp/config/clangd.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - capabilities = { - offsetEncoding = "utf-8", - }, -} diff --git a/lsp/config/rust_analyzer.lua b/lsp/config/rust_analyzer.lua deleted file mode 100644 index 456c478..0000000 --- a/lsp/config/rust_analyzer.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - settings = { - ["rust-analyzer"] = { - checkOnSave = { - command = "clippy", - extraArgs = { - "--", - "-W", "clippy::pedantic", - "-W", "clippy::nursery", - "-W", "clippy::unwrap_used", - "-W", "clippy::expect_used", - }, - }, - }, - }, -} diff --git a/lsp/on_attach.lua b/lsp/on_attach.lua deleted file mode 100644 index bb471c5..0000000 --- a/lsp/on_attach.lua +++ /dev/null @@ -1,9 +0,0 @@ -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", "uH", function() inlayhints.toggle() end, { desc = "Toggle inlay hints" }) - end - end -end diff --git a/lua/user/init.lua b/lua/user/init.lua new file mode 100644 index 0000000..17ca30c --- /dev/null +++ b/lua/user/init.lua @@ -0,0 +1,104 @@ +local config = { + options = { + opt = { + colorcolumn = "80,120", + }, + g = { + inlay_hints_enabled = true, + }, + }, + + lsp = { + config = { + rust_analyzer = { + settings = { + ["rust-analyzer"] = { + cargo = { + buildScripts = { enable = true }, + }, + procMacrto = { enable = true }, + check = { + command = "clippy", + overrideCommand = "clippy --message-format=json", + }, + }, + }, + }, + }, + }, + + -- Add plugins + plugins = { + -- Extended file type support + { "sheerun/vim-polyglot", lazy = false }, + + -- Community plugins + "AstroNvim/astrocommunity", + { import = "astrocommunity.pack.angular" }, + { import = "astrocommunity.pack.ansible" }, + { import = "astrocommunity.pack.astro" }, + { import = "astrocommunity.pack.bash" }, + { import = "astrocommunity.pack.clojure" }, + { import = "astrocommunity.pack.cmake" }, + { import = "astrocommunity.pack.cpp" }, + { import = "astrocommunity.pack.cs" }, + { import = "astrocommunity.pack.cue" }, + { import = "astrocommunity.pack.dart" }, + { import = "astrocommunity.pack.docker" }, + { import = "astrocommunity.pack.docker" }, + { import = "astrocommunity.pack.edgedb" }, + { import = "astrocommunity.pack.full-dadbod" }, + { import = "astrocommunity.pack.go" }, + { import = "astrocommunity.pack.godot" }, + { import = "astrocommunity.pack.haskell" }, + { import = "astrocommunity.pack.haxe" }, + { import = "astrocommunity.pack.helm" }, + { import = "astrocommunity.pack.html-css" }, + { import = "astrocommunity.pack.java" }, + { import = "astrocommunity.pack.json" }, + { import = "astrocommunity.pack.julia" }, + { import = "astrocommunity.pack.kotlin" }, + { import = "astrocommunity.pack.lua" }, + { import = "astrocommunity.pack.markdown" }, + { import = "astrocommunity.pack.nix" }, + { import = "astrocommunity.pack.php" }, + { import = "astrocommunity.pack.prisma" }, + { import = "astrocommunity.pack.proto" }, + { import = "astrocommunity.pack.ps1" }, + { import = "astrocommunity.pack.python" }, + { import = "astrocommunity.pack.quarto" }, + { import = "astrocommunity.pack.ruby" }, + { import = "astrocommunity.pack.rust" }, + { import = "astrocommunity.pack.scala" }, + { import = "astrocommunity.pack.svelte" }, + { import = "astrocommunity.pack.tailwindcss" }, + { import = "astrocommunity.pack.terraform" }, + { import = "astrocommunity.pack.toml" }, + { import = "astrocommunity.pack.typescript" }, + { import = "astrocommunity.pack.vue" }, + { import = "astrocommunity.pack.wgsl" }, + { import = "astrocommunity.pack.yaml" }, + { import = "astrocommunity.pack.zig" }, + + { import = "astrocommunity.diagnostics.trouble-nvim" }, + { import = "astrocommunity.git.git-blame-nvim" }, + + -- use moden inlay hints: + { + "p00f/clangd_extensions.nvim", + optional = true, + opts = { extensions = { autoSetHints = true } }, + }, + { + "simrat39/rust-tools.nvim", + optional = true, + opts = { + tools = { + inlay_hints = { auto = true }, + }, + }, + }, + }, +} + +return config diff --git a/options.lua b/options.lua deleted file mode 100644 index 4bac5b3..0000000 --- a/options.lua +++ /dev/null @@ -1,26 +0,0 @@ -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, - } -} diff --git a/plugins/init.lua b/plugins/init.lua deleted file mode 100644 index ca5121e..0000000 --- a/plugins/init.lua +++ /dev/null @@ -1,49 +0,0 @@ -require("rust-tools").setup({ - tools = { - inlay_hints = { - auto = true - } - }, - server = { - checkOnSave = { - command = "clippy", - extraArgs = { - "--", - "-W", "clippy::pedantic", - "-W", "clippy::nursery", - "-W", "clippy::unwrap_used", - "-W", "clippy::expect_used", - }, - }, - }, -}) -return { - ["simrat39/rust-tools.nvim"] = { - after = { "mason-lspconfig.nvim" }, - config = function() - require("rust-tools").setup({ - tools = { - inlay_hints = { - auto = true - } - }, - server = { - checkOnSave = { - command = "clippy", - extraArgs = { - "--", - "-W", "clippy::pedantic", - "-W", "clippy::nursery", - "-W", "clippy::unwrap_used", - "-W", "clippy::expect_used", - }, - }, - }, - }) - end, - }, - ["lvimuser/lsp-inlayhints.nvim"] = { - module = "lsp-inlayhints", - config = function() require "user.plugins.lsp-inlayhints" end, - }, -} diff --git a/plugins/lsp-inlayhints.lua b/plugins/lsp-inlayhints.lua deleted file mode 100644 index 3c35054..0000000 --- a/plugins/lsp-inlayhints.lua +++ /dev/null @@ -1 +0,0 @@ -require("lsp-inlayhints").setup() diff --git a/updater.lua b/updater.lua deleted file mode 100644 index e714f09..0000000 --- a/updater.lua +++ /dev/null @@ -1,12 +0,0 @@ -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, -}