Compare commits

...

10 Commits

Author SHA1 Message Date
abea2807ce chore(main): release 4.27.0 (#1069)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-06 20:46:37 +02:00
44cdb5eac5 feat(lang): add python support (#1031) 2023-07-06 20:43:19 +02:00
0db31c2840 feat(extras): add terraform extra (#1030) 2023-07-06 19:46:34 +02:00
22c9477b96 feat(flash): use c-s in the cmdline to toggle flash 2023-07-06 15:51:31 +02:00
baa9614022 fix(autocmds): jump to last loc in buffer (#1061)
vim.api.nvim_win_set_cursor is expecting a window handle but was being
passed the current buffer's handle instead
2023-07-06 15:43:15 +02:00
b660b51718 chore(main): release 4.26.0 (#1068)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-06 15:40:33 +02:00
99f30f9a37 chore(build): auto-generate vimdoc 2023-07-06 13:36:51 +00:00
ae054ec13c feat(vscode): easier way to enable/disable plugins 2023-07-06 15:36:03 +02:00
bcff5a1937 fix(util): use spec to check if a plugin is enabled 2023-07-06 15:35:34 +02:00
299aae3545 fix(flash): depraction warning 2023-07-06 15:21:45 +02:00
8 changed files with 141 additions and 21 deletions

View File

@ -1,5 +1,32 @@
# Changelog
## [4.27.0](https://github.com/LazyVim/LazyVim/compare/v4.26.0...v4.27.0) (2023-07-06)
### Features
* **extras:** add terraform extra ([#1030](https://github.com/LazyVim/LazyVim/issues/1030)) ([0db31c2](https://github.com/LazyVim/LazyVim/commit/0db31c2840af662c856d5b9a09d87bc266e7fa40))
* **flash:** use c-s in the cmdline to toggle flash ([22c9477](https://github.com/LazyVim/LazyVim/commit/22c9477b9642b1a8abc303ffcb44c6989c7a5ca2))
* **lang:** add python support ([#1031](https://github.com/LazyVim/LazyVim/issues/1031)) ([44cdb5e](https://github.com/LazyVim/LazyVim/commit/44cdb5eac556733db53afeebcdc6ef91408de0c3))
### Bug Fixes
* **autocmds:** jump to last loc in buffer ([#1061](https://github.com/LazyVim/LazyVim/issues/1061)) ([baa9614](https://github.com/LazyVim/LazyVim/commit/baa96140227a3727b2ea2053f37aa2b7253bb45a))
## [4.26.0](https://github.com/LazyVim/LazyVim/compare/v4.25.1...v4.26.0) (2023-07-06)
### Features
* **vscode:** easier way to enable/disable plugins ([ae054ec](https://github.com/LazyVim/LazyVim/commit/ae054ec13c987ff5ce39cfc88917f8243abae72e))
### Bug Fixes
* **flash:** depraction warning ([299aae3](https://github.com/LazyVim/LazyVim/commit/299aae3545aa7b7a67a6907e089d80cd63938bf6))
* **util:** use spec to check if a plugin is enabled ([bcff5a1](https://github.com/LazyVim/LazyVim/commit/bcff5a19379e32a85049500de420aa24b271fb72))
## [4.25.1](https://github.com/LazyVim/LazyVim/compare/v4.25.0...v4.25.1) (2023-07-04)

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 04
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 July 06
==============================================================================
Table of Contents *LazyVim-table-of-contents*

View File

@ -38,7 +38,7 @@ vim.api.nvim_create_autocmd("BufReadPost", {
local mark = vim.api.nvim_buf_get_mark(buf, '"')
local lcount = vim.api.nvim_buf_line_count(buf)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, buf, mark)
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
end,
})

View File

@ -40,6 +40,14 @@ return {
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
{
@ -49,7 +57,7 @@ return {
local function flash(prompt_bufnr)
require("flash").jump({
pattern = "^",
highlight = { label = { after = { 0, 0 } } },
label = { after = { 0, 0 } },
search = {
mode = "search",
exclude = {

View File

@ -0,0 +1,67 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "ninja", "python", "rst", "toml" })
end
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
pyright = {},
ruff_lsp = {},
},
},
setup = {
ruff_lsp = function()
require("lazyvim.util").on_attach(function(client, _)
if client.name == "ruff_lsp" then
-- Disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false
end
end)
end,
},
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"nvim-neotest/neotest-python",
},
opts = {
adapters = {
["neotest-python"] = {
-- Here you can specify the settings for the adapter, i.e.
-- runner = "pytest",
-- python = ".venv/bin/python",
},
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
"mfussenegger/nvim-dap-python",
-- stylua: ignore
keys = {
{ "<leader>dPt", function() require('dap-python').test_method() end, desc = "Debug Method" },
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class" },
},
config = function()
local path = require("mason-registry").get_package("debugpy"):get_install_path()
require("dap-python").setup(path .. "/venv/bin/python")
end,
},
},
{
"linux-cultist/venv-selector.nvim",
cmd = "VenvSelect",
opts = {},
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
},
}

View File

@ -0,0 +1,33 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, {
"terraform",
"hcl",
})
end
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
terraformls = {},
},
},
},
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, opts)
if type(opts.sources) == "table" then
local null_ls = require("null-ls")
vim.list_extend(opts.sources, {
null_ls.builtins.formatting.terraform_fmt,
null_ls.builtins.diagnostics.terraform_validate,
})
end
end,
},
}

View File

@ -21,23 +21,8 @@ local Config = require("lazy.core.config")
local Plugin = require("lazy.core.plugin")
Config.options.checker.enabled = false
Config.options.change_detection.enabled = false
-- HACK: disable all plugins except the ones we want
local fix_disabled = Plugin.Spec.fix_disabled
function Plugin.Spec.fix_disabled(self)
for _, plugin in pairs(self.plugins) do
if not (vim.tbl_contains(enabled, plugin.name) or plugin.vscode) then
plugin.enabled = false
end
end
fix_disabled(self)
end
-- HACK: don't clean plugins in vscode
local update_state = Plugin.update_state
function Plugin.update_state()
update_state()
Config.to_clean = {}
Config.options.defaults.cond = function(plugin)
return vim.tbl_contains(enabled, plugin.name) or plugin.vscode
end
-- Add some vscode specific keymaps

View File

@ -17,7 +17,7 @@ end
---@param plugin string
function M.has(plugin)
return require("lazy.core.config").plugins[plugin] ~= nil
return require("lazy.core.config").spec.plugins[plugin] ~= nil
end
function M.fg(name)