packer.nvim
neovim-lua
Our great sponsors
packer.nvim | neovim-lua | |
---|---|---|
180 | 25 | |
7,576 | 799 | |
- | - | |
3.4 | 3.6 | |
about 2 months ago | 23 days ago | |
Lua | Lua | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
packer.nvim
-
thethethe.nvim - neovim friendly autocorrect plugin
packer
-
Help Enablin Powerline Font for Lightline in Kitty NeoVim
-- Check if Packer.nvim is already installed if fn.empty(fn.glob(install_path)) > 0 then -- If not installed, clone it from GitHub fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) -- Load Packer.nvim vim.cmd [[packadd packer.nvim]] return true end return false end
-
Installing neovim on windows 10 does not work (no really, it doesn't)
local ensure_packer = function() local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) vim.cmd [[packadd packer.nvim]] return true end return false end
-
Issue with treesitter highlights, disappears after 5 seconds each time
local fn = vim.fn -- Automatically install packer local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" if fn.empty(fn.glob(install_path)) > 0 then PACKER_BOOTSTRAP = fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path, }) print("Installing packer close and reopen Neovim...") vim.cmd([[packadd packer.nvim]]) end -- Autocommand that reloads neovim whenever you save the plugins.lua file vim.cmd([[ augroup packer_user_config autocmd! autocmd BufWritePost plugins.lua source | PackerSync augroup end ]]) -- Use a protected call so we don't error out on first use local status_ok, packer = pcall(require, "packer") if not status_ok then return end -- Have packer use a popup window packer.init({ display = { open_fn = function() return require("packer.util").float({ border = "rounded" }) end, }, }) -- Install your plugins here return packer.startup(function(use) -- My plugins here use({ "wbthomason/packer.nvim" }) -- Have packer manage itself use({ "nvim-lua/plenary.nvim" }) -- Useful lua functions used by lots of plugins use({ "windwp/nvim-autopairs" }) -- Autopairs, integrates with both cmp and treesitter use({ "numToStr/Comment.nvim" }) use({ "JoosepAlviste/nvim-ts-context-commentstring" }) use({ "kyazdani42/nvim-web-devicons" }) use({ "akinsho/bufferline.nvim" }) use({ "moll/vim-bbye" }) use({ "nvim-lualine/lualine.nvim" }) use({ "akinsho/toggleterm.nvim" }) use({ "ahmedkhalf/project.nvim" }) use({ "lewis6991/impatient.nvim" }) use({ "lukas-reineke/indent-blankline.nvim" }) use({ "goolord/alpha-nvim" }) use("folke/which-key.nvim") -- Colorschemes use({ "folke/tokyonight.nvim" }) use("lunarvim/darkplus.nvim") use("bluz71/vim-moonfly-colors") use("fcpg/vim-fahrenheit") use("rainglow/vim") use("wojciechkepka/vim-github-dark") use("gavinok/spaceway.vim") use({"mcchrish/zenbones.nvim", requires = "rktjmp/lush.nvim"}) use({ "ellisonleao/gruvbox.nvim" }) -- Gruvbox theme -- LSP use({ "neovim/nvim-lspconfig" }) -- enable LSP use({ "williamboman/nvim-lsp-installer" }) -- simple to use language server installer use({ "jose-elias-alvarez/null-ls.nvim" }) -- for formatters and linters -- Telescope use({ "nvim-telescope/telescope.nvim" }) -- Treesitter use("nvim-treesitter/nvim-treesitter", {run = ':TSUpdate'}) use("nvim-treesitter/nvim-treesitter-context") use("nvim-treesitter/playground") -- Editor plugins use({ "karb94/neoscroll.nvim" }) -- Git use({ "lewis6991/gitsigns.nvim" }) -- LSP Zero use { 'VonHeikemen/lsp-zero.nvim', requires = { -- LSP Support {'neovim/nvim-lspconfig'}, -- Required {'williamboman/mason.nvim'}, -- Optional {'williamboman/mason-lspconfig.nvim'}, -- Optional -- Autocompletion {'hrsh7th/nvim-cmp'}, -- Required {'hrsh7th/cmp-buffer'}, {'hrsh7th/cmp-path'}, {'hrsh7th/cmp-nvim-lua'}, {'hrsh7th/cmp-nvim-lsp'}, -- Required {'L3MON4D3/LuaSnip'}, -- Required {'rafamadriz/friendly-snippets'}, } } -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins if PACKER_BOOTSTRAP then require("packer").sync() end end)
-
Editing init.lua with lua_ls on gives "Undefined global : vim" ?
require('packer').startup(function(use) use 'https://github.com/wbthomason/packer.nvim' use 'https://github.com/neovim/nvim-lspconfig' end)
- error message whenever I write a file
-
[Help] Packer.nvim
git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim
-
Pyright Won't Let me Quit Python Files
``` vim.g.maplocalleader = " " vim.g.mapleader = " " local ensure_packer = function() local fn = vim.fn local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" if fn.empty(fn.glob(install_path)) > 0 then fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) vim.cmd([[packadd packer.nvim]]) return true end return false end
- [Neovim] Gestionnaire de packages basé à Lua
neovim-lua
- GitHub - brainfucksec/neovim-lua: Neovim KISS configuration with Lua - Update config with lazy.nvim and other changes.
-
Finally written my nvim config in lua here is the link of my dots https://github.com/mdk4if/nvimDots.git . It's not too good i am damn sure but i will make it better for sure . Thanks for reading
I used this as a starting point: https://github.com/brainfucksec/neovim-lua/blob/main/nvim/lua/core/options.lua, but remove matchit from the table.
-
LSP warnings when assigning most vim options
-- LSP Configuration & Plugins local M = { 'neovim/nvim-lspconfig', event = "BufReadPre", dependencies = { -- Automatically install LSP servers, DAP servers, linters, formatters 'williamboman/mason.nvim', -- Recommended when using mason together with LSP, bridges the gap 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP 'j-hui/fidget.nvim', -- Additional lua configuration 'folke/neodev.nvim', -- Integration "hrsh7th/cmp-nvim-lsp", -- Integration 'kevinhwang91/nvim-ufo', }, } function M.config() require("mason").setup() local u = require("core/utils") -- Customizing how diagnostics are displayed, source: https://github.com/brainfucksec/neovim-lua/blob/main/nvim/lua/lsp/lspconfig.lua vim.diagnostic.config({ update_in_insert = true, float = { focusable = false, style = "minimal", border = "rounded", source = "always", header = "", prefix = "", }, }) -- diagnostic (l) -- See `:help vim.diagnostic.*` for documentation on any of the below functions local opts = { noremap=true, silent=true } u.bind(u.normal, "Show diagnostics in a floating window (#lsp)", "ll", vim.diagnostic.open_float, opts) u.bind(u.normal, "Goto next diagnostic (#lsp)", "ln", vim.diagnostic.goto_next, opts) u.bind(u.normal, "Goto previous diagnostic (#lsp)", "lp", vim.diagnostic.goto_prev, opts) u.bind(u.normal, "Show diagnostics list in location list (#lsp)", "lq", vim.diagnostic.setloclist, opts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(_, bufnr) -- Enable completion triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- lsp (l) -- See `:help vim.lsp.*` for documentation on any of the below functions local bufopts = { noremap=true, silent=true, buffer=bufnr } u.bind(u.normal, "Jump to definition (#lsp)", {"ld", "gd"}, vim.lsp.buf.definition, bufopts) u.bind(u.normal, "Jump to declaration (#lsp)", {"lD", "gD"}, vim.lsp.buf.declaration, bufopts) u.bind(u.normal, "Jump to type definition (#lsp)", "lt", vim.lsp.buf.type_definition, bufopts) u.bind(u.normal, "Show implementations list in quickfix window (#lsp)", {"li", "gi"}, vim.lsp.buf.implementation, bufopts) u.bind(u.normal, "Show references in the quickfix window (#lsp)", {"lr", "gr"}, vim.lsp.buf.references, bufopts) u.bind(u.normal, "Show signature help in floating window (#lsp)", {"lk", ""}, vim.lsp.buf.signature_help, bufopts) u.bind(u.normal, "Show hover information in floating window (#lsp)", "lK", vim.lsp.buf.hover, bufopts) vim.keymap.set("n", "K", function() local winid = require("ufo").peekFoldedLinesUnderCursor() if not winid then vim.lsp.buf.hover() end end) u.bind(u.normal, "Rename buffer (#lsp)", "lR", vim.lsp.buf.rename, bufopts) u.bind(u.normal, "Select code action (#lsp)", "la", vim.lsp.buf.code_action, bufopts) u.bind(u.normal, "Format buffer (#lsp)", "lf", function() vim.lsp.buf.format { async = true } end, bufopts) -- workspace u.bind(u.normal, "Add buffer location as workspace folder (lsp)", "lw", vim.lsp.buf.add_workspace_folder, bufopts) u.bind(u.normal, "Remove buffer location as workspace folder (lsp)", "lW", vim.lsp.buf.remove_workspace_folder, bufopts) u.bind(u.normal, "List workspace folders (lsp)", "lL", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) u.bind(u.normal, "Show workspace diagnostics in Telescope (lsp)", "lQ", "Telescope diagnostics", bufopts) end -- nvim-cmp supports additional completion capabilities, so broadcast that to servers local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) -- Neovim hasn't added foldingRange to default capabilities, users must add it manually, source: https://github.com/kevinhwang91/nvim-ufo capabilities.textDocument.foldingRange = { dynamicRegistration = false, lineFoldingOnly = true } local mason_lspconfig = require("mason-lspconfig") local servers = { astro = {}, bashls = {}, cssls = {}, dockerls = {}, eslint = {}, graphql = {}, html = {}, jsonls = { on_new_config = function(new_config) new_config.settings.json.schemas = new_config.settings.json.schemas or {} vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas()) end, settings = { json = { format = { enable = true, }, validate = { enable = true }, }, }, }, tsserver = {}, marksman = {}, pyright = {}, tailwindcss = {}, yamlls = {}, sumneko_lua = { Lua = { workspace = { checkThirdParty = false }, telemetry = { enable = false }, diagnostics = { -- Get the language server to recognize the `vim` global. globals = { 'vim', 'require' }, }, }, }, } -- Setup neovim lua configuration require('neodev').setup() mason_lspconfig.setup { ensure_installed = vim.tbl_keys(servers), automatic_installation = true, } local lspconfig = require("lspconfig") mason_lspconfig.setup_handlers { -- This is a default handler that will be called for each installed server (also for new servers that are installed during a session) function (server_name) lspconfig[server_name].setup { on_attach = on_attach, capabilities = capabilities, settings = servers[server_name], } end, } -- Turn on lsp status information require('fidget').setup() end return M
-
What are best plugins for C++, Java, Kotlin, Python, & LaTex
I'm not a lua expert, so prior, I simply grabbed one off GitHub, and made a few changes. It's been okay, but does not support LSP for Java or Kotlin. And doesn't use fzf (telescope?).
-
Appending to errorformat breaks quickfix
Disclaimer: It may appear that I know what the hell I am doing with lua, but I do not. I am using a lua configuration from here: https://github.com/brainfucksec/neovim-lua. I am appending the above to his options.lua and am copying his append example from above in the same file.
-
neovim-lua - Working on improvements for LSP and celebrating 2 years with Lua
neovim-lua
-
What is the most reliable neovim based editor?
What I ended up starting with that worked out of the box was brainfucksec’s kiss setup
-
wanting to switch from vscode to neovim
Rather than NvChad, I think this might be a better place to start since it includes only those you need This playlist was very helpful: https://www.youtube.com/watch?v=ctH-a-1eUME&list=PLhoH5vyxr6Qq41NFL4GvhFp-WLd5xzIzZ
-
I am getting ready to make a new lua config and want a basic config to start with.
https://github.com/brainfucksec/neovim-lua I found this one pretty simple, still all the basics are covered.
- Share any cool configuration templates that you know
What are some alternatives?
vim-plug - :hibiscus: Minimalist Vim Plugin Manager
NvChad - Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience.
lazy.nvim - 💤 A modern plugin manager for Neovim
vista.vim - :cactus: Viewer & Finder for LSP symbols and tags
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
Neovim-from-scratch - 📚 A Neovim config designed from scratch to be understandable
nvim-lspconfig - Quickstart configs for Nvim LSP
NvChad - An attempt to make neovim cli as functional as an IDE while being very beautiful , blazing fast. [Moved to: https://github.com/NvChad/NvChad]
paq-nvim - 🌚 Neovim package manager
Cozette - A bitmap programming font optimized for coziness 💜
gruvbox.nvim - Lua port of the most famous vim colorscheme
beacon.nvim - Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is