diff --git a/CHANGELOG.md b/CHANGELOG.md index a8c9cc0a..4e3b1fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [11.5.0](https://github.com/LazyVim/LazyVim/compare/v11.4.1...v11.5.0) (2024-05-21) + + +### Features + +* **comments:** use ts-comments.nvim instead of nvim-ts-context-commentstring on Neovim 0.10 ([8ba7c64](https://github.com/LazyVim/LazyVim/commit/8ba7c64a7da9e46f2ac601919508803824208935)) +* **telescope:** add quickfix and telescope keymaps ([#3077](https://github.com/LazyVim/LazyVim/issues/3077)) ([ab4e57a](https://github.com/LazyVim/LazyVim/commit/ab4e57a4bfe6107c21a25450292ef69537a2b37b)) + + +### Bug Fixes + +* **cmp:** fix cmp's broken snippet parsing functionality. Fixes [#3266](https://github.com/LazyVim/LazyVim/issues/3266) ([2bae438](https://github.com/LazyVim/LazyVim/commit/2bae438570aa96904836e56d8dad7f33eb3204ee)) +* **lsp:** sometimes lsp client is not fully initialized and doesnt yet have client.supports_method on 0.9.5. Fixes [#3263](https://github.com/LazyVim/LazyVim/issues/3263) ([8c94842](https://github.com/LazyVim/LazyVim/commit/8c94842b4a613995bf4c0c79febcd74c310439d0)) +* **neo-tree:** better icons for git staged/unstaged ([e46dd4e](https://github.com/LazyVim/LazyVim/commit/e46dd4e9b2ac68a5058447ef73b413605d15ae62)) +* **nvim-snippets:** enable global friendly-snippets. See [#3240](https://github.com/LazyVim/LazyVim/issues/3240) ([55b07de](https://github.com/LazyVim/LazyVim/commit/55b07dee21ee5306624e16dd90c2b3c9c0f3ddde)) +* **snippets:** fixes custom snippets. use my branch till nvim-snippets PR is merged. Fixes [#3240](https://github.com/LazyVim/LazyVim/issues/3240) ([cb1e1b9](https://github.com/LazyVim/LazyVim/commit/cb1e1b9c82b405fa277f1869cd04dcd9c4507412)) +* **snippets:** make friendly snippets a dep of nvim-snippets ([d73397c](https://github.com/LazyVim/LazyVim/commit/d73397c4aaac74d95970ac06caffa25abd7c2af4)) +* **snippets:** my nvim-snippets PR is merged, so remove work-around. That was quick :) ([027d6bc](https://github.com/LazyVim/LazyVim/commit/027d6bc2e896d453153f48a8c15db2a627698dc8)) + +## [11.4.1](https://github.com/LazyVim/LazyVim/compare/v11.4.0...v11.4.1) (2024-05-20) + + +### Bug Fixes + +* **java:** properly pass settings to jdtls ([8e67bb1](https://github.com/LazyVim/LazyVim/commit/8e67bb124009e0dbf29f8e78d701d07756670278)) + ## [11.4.0](https://github.com/LazyVim/LazyVim/compare/v11.3.2...v11.4.0) (2024-05-20) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 589e4b1c..659a28ab 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -71,6 +71,16 @@ return { for _, source in ipairs(opts.sources) do source.group_index = source.group_index or 1 end + + local parse = require("cmp.utils.snippet").parse + require("cmp.utils.snippet").parse = function(input) + local ok, ret = pcall(parse, input) + if ok then + return ret + end + return LazyVim.cmp.snippet_preview(input) + end + local cmp = require("cmp") cmp.setup(opts) cmp.event:on("confirm_done", function(event) @@ -89,8 +99,14 @@ return { and { "nvim-cmp", dependencies = { - { "rafamadriz/friendly-snippets" }, - { "garymjr/nvim-snippets", opts = { friendly_snippets = true } }, + { + "garymjr/nvim-snippets", + opts = { + friendly_snippets = true, + global_snippets = { "all", "global" }, + }, + dependencies = { "rafamadriz/friendly-snippets" }, + }, }, opts = function(_, opts) opts.snippet = { @@ -150,22 +166,10 @@ return { -- comments { - "JoosepAlviste/nvim-ts-context-commentstring", - lazy = true, - opts = { - enable_autocmd = false, - }, - init = function() - if vim.fn.has("nvim-0.10") == 1 then - vim.schedule(function() - local get_option = vim.filetype.get_option - vim.filetype.get_option = function(filetype, option) - return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring() - or get_option(filetype, option) - end - end) - end - end, + "folke/ts-comments.nvim", + event = "VeryLazy", + opts = {}, + enabled = vim.fn.has("nvim-0.10") == 1, }, { import = "lazyvim.plugins.extras.coding.mini-comment", diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index b09d4f02..3c98ba8e 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -96,6 +96,12 @@ return { expander_expanded = "", expander_highlight = "NeoTreeExpander", }, + git_status = { + symbols = { + unstaged = "󰄱", + staged = "󰱒", + }, + }, }, }, config = function(_, opts) @@ -197,11 +203,14 @@ return { { "sG", LazyVim.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" }, { "sh", "Telescope help_tags", desc = "Help Pages" }, { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, + { "sj", "Telescope jumplist", desc = "Jumplist" }, { "sk", "Telescope keymaps", desc = "Key Maps" }, + { "sl", "Telescope loclist", desc = "Location List" }, { "sM", "Telescope man_pages", desc = "Man Pages" }, { "sm", "Telescope marks", desc = "Jump to Mark" }, { "so", "Telescope vim_options", desc = "Options" }, { "sR", "Telescope resume", desc = "Resume" }, + { "sq", "Telescope quickfix", desc = "Quickfix List" }, { "sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" }, { "sW", LazyVim.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" }, { "sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (Root Dir)" }, diff --git a/lua/lazyvim/plugins/extras/coding/mini-comment.lua b/lua/lazyvim/plugins/extras/coding/mini-comment.lua index d401c9de..457787ef 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-comment.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-comment.lua @@ -10,4 +10,11 @@ return { }, }, }, + { + "JoosepAlviste/nvim-ts-context-commentstring", + lazy = true, + opts = { + enable_autocmd = false, + }, + }, } diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index e290f174..81f4cc88 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -5,6 +5,16 @@ return { root = "README.md", }) end, + { + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + ["markdown"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + }, + }, + }, { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 6479f1df..e14a5e13 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -61,7 +61,7 @@ function M._check_methods(client, buffer) for method, clients in pairs(M._supports_method) do clients[client] = clients[client] or {} if not clients[client][buffer] then - if client.supports_method(method, { bufnr = buffer }) then + if client.supports_method and client.supports_method(method, { bufnr = buffer }) then clients[client][buffer] = true vim.api.nvim_exec_autocmds("User", { pattern = "LspSupportsMethod",