diff --git a/init.lua b/init.lua index 0fda20c..ffe8d7f 100644 --- a/init.lua +++ b/init.lua @@ -35,3 +35,5 @@ require "nvchad.autocmds" vim.schedule(function() require "mappings" end) + +local saga = "lspsaga" diff --git a/lazy-lock.json b/lazy-lock.json index 4bb4065..a44d952 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,15 +11,19 @@ "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "flutter-tools.nvim": { "branch": "main", "commit": "65b7399804315a1160933b64292d3c5330aa4e9f" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "fugit2.nvim": { "branch": "main", "commit": "48ceeb550a517e8fd28de4f72a313940a4777a71" }, "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, "nvim-lspconfig": { "branch": "master", "commit": "b0caeef0d835fbe19df6ad71dbc4345eaaea649c" }, + "nvim-tinygit": { "branch": "main", "commit": "a8832a2a889e82efe59b7af569795dc0ae657a5a" }, "nvim-tree.lua": { "branch": "master", "commit": "f0e9951778802526b14c934f7bf746e1e0ae5ed0" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" }, diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index c6ba478..4bd9319 100644 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -6,6 +6,7 @@ local servers = { cssld = {}, clangd = {}, ts_ls = {}, + dartls = {}, } for name, opts in pairs(servers) do diff --git a/lua/custom/configs/highlight.lua b/lua/custom/configs/highlight.lua new file mode 100644 index 0000000..f79b168 --- /dev/null +++ b/lua/custom/configs/highlight.lua @@ -0,0 +1,10 @@ +local highlight = { + "CatppuccinRed", + "CatppuccinPeach", + "CatppuccinYellow", + "CatppuccinGreen", + "CatppuccinBlue", + "CatppuccinPurple", +} + +return highlight diff --git a/lua/mappings.lua b/lua/mappings.lua index ee60558..ff29df1 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -7,3 +7,5 @@ map("n", ";", ":", { desc = "CMD enter command mode" }) -- i then j&k to escape map("i", "jk", "") + +map("n", "a", "Lspsaga code_action", { desc = "Display code actions" }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fadae73..3353628 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,5 @@ return { + -- config for formatters { "stevearc/conform.nvim", @@ -40,4 +41,74 @@ return { }, config = true, }, + + -- harness lsps' full power + { + "nvimdev/lspsaga.nvim", + event = "LspAttach", + config = function() + require("lspsaga").setup {} + end, + dependencies = { + "nvim-treesitter/nvim-treesitter", -- optional + "nvim-tree/nvim-web-devicons", -- optional + }, + + -- beautiful git + { + "SuperBo/fugit2.nvim", + build = false, + opts = { + width = 100, + }, + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", + "nvim-lua/plenary.nvim", + { + "chrisgrieser/nvim-tinygit", -- optional: for Github PR view + dependencies = { "stevearc/dressing.nvim" }, + }, + }, + cmd = { "Fugit2", "Fugit2Diff", "Fugit2Graph" }, + keys = { + { "F", mode = "n", "Fugit2" }, + }, + }, + }, + + -- Beautiful indent helpers + -- { + -- "lukas-reineke/indent-blankline.nvim", + -- version = false, + -- config = function(_, opts) + -- local highlight = { + -- "RainbowRed", + -- "RainbowYellow", + -- "RainbowBlue", + -- "RainbowOrange", + -- "RainbowGreen", + -- "RainbowViolet", + -- "RainbowCyan", + -- } + -- + -- local hooks = require "ibl.hooks" + -- -- create the highlight groups in the highlight setup hook, so they are reset + -- -- every time the colorscheme changes + -- hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + -- vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + -- vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + -- vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + -- vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + -- vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + -- vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + -- vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) + -- end) + -- + -- require("ibl").setup { + -- indent = { highlight = highlight }, + -- scope = { enabled = true, show_start = true, highlight = highlight }, + -- } + -- end, + -- }, }