Giter VIP home page Giter VIP logo

starter's Introduction

starter's People

Contributors

733amir avatar catdadcode avatar denartha10 avatar drummyfloyd avatar folke avatar hitchhooker avatar hunterliao29 avatar jessezomer avatar joshryandavis avatar justalawngnome7 avatar mirsella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starter's Issues

lazyvim.config.options no such option: 'splitkeep'

After cloning the starter repo into my ~/.config/nvim and starting neovim up for the second time after lazy bootstraps all the plugins I keep getting this error on startup:

Error detected while processing /home/user/.config/nvim/init.lua:
Failed loading lazyvim.config.options
vim/_meta.lua:0: no such option: 'splitkeep'
# stacktrace:
  - vim/_meta.lua:0 _in_ **__index**
  - vim/_meta.lua:0 _in_ ****
  - vim/_meta.lua:0 _in_ **__newindex**
  - /LazyVim/lua/lazyvim/config/options.lua:52
  - /LazyVim/lua/lazyvim/config/init.lua:118
  - /LazyVim/lua/lazyvim/config/init.lua:117 _in_ **load**
  - /LazyVim/lua/lazyvim/plugins/init.lua:4
  - lazy.lua:9

My nvim (neovim-nightly-bin from AUR):

NVIM v0.9.0-dev-16-g56998feeb
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

No specs found

I've created the starter and when it runs it shows me this error:

Error detected while processing /Users/joshmedeski/.config/nvim/init.lua:
No specs found for module lazyvim.plugins
Press ENTER or type command to continue

I've confirmed that LazyVim/LazyVim is properly installed, but this line seems to be failing.

Any ideas?

How to enable neo-tree.nvim to show hidden filkes in a folder?

I followed this issue to enable neo-tree.nvim to show hidden filkes in a folder. I created util.lua under plugins folder:

return {
  {
    "nvim-neo-tree/neo-tree.nvim",
    opts = {
      filesystem = {
        visible = true, -- This is what you want: If you set this to `true`, all "hide" just mean "dimmed out"
        hide_dotfiles = false,
        hide_gitignored = true,
        bind_to_cwd = false,
        follow_current_file = true,
      },
    },
  },
}

But it does not work. How to fix it?

overriding certain plugins doesn't work properly

i can't get the flash.nvim plugin to override its config for some reason with the default starter clone

here's something to reproduce it.

my overrides actually DO work if i first set defaults.version = '*' in the lazy spec, and then update all my plugins. but then i get a lot of other issues like slowness in the UI when i restart nvim.. keeping defaults.version = false is the right move but how can i get flash.nvim overrides working without doing that?

disabling flash.nvim works nicely, but i want to use it

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- bootstrap lazy.nvim
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

require("lazy").setup({
  spec = {
    -- add LazyVim and import its plugins
    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    -- import any extras modules here
    -- { import = "lazyvim.plugins.extras.lang.typescript" },
    -- { import = "lazyvim.plugins.extras.lang.json" },
    -- { import = "lazyvim.plugins.extras.ui.mini-animate" },
    -- import/override with your plugins
    { import = "plugins" },
    {
      "folke/flash.nvim",
      event = "VeryLazy",
      ---@type Flash.Config
      opts = {
        char = {
          -- keys = { [";"] = "H", [","] = "L" },
          keys = { "f", "F", "t", "T", [";"] = "L", [","] = "H" },
        },
      },
    },
  },
  defaults = {
    -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
    -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
    lazy = false,
    -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
    -- have outdated releases, which may break your Neovim install.
    version = false, -- always use the latest git commit
    -- version = "*", -- try installing the latest stable version for plugins that support semver
  },
  install = { colorscheme = { "tokyonight", "habamax" } },
  checker = { enabled = true }, -- automatically check for plugin updates
  performance = {
    rtp = {
      -- disable some rtp plugins
      disabled_plugins = {
        "gzip",
        -- "matchit",
        -- "matchparen",
        -- "netrwPlugin",
        "tarPlugin",
        "tohtml",
        "tutor",
        "zipPlugin",
      },
    },
  },
})

Remove .neoconf.json?

After introduction of lazydev.nvim and neoconf.nvim being pushed into extras. I wonder if its time to remove .neoconf.json from the starter template.

Seeking suggestions on customizing, "making it mine"

A great way to create a fully functional nvim! What would be my options, and your suggestions, on best ways to customize for my preferences?

I have [re]configured nvim several times, more recently to go mostly all Lua, and most recently to move to Lazy, so I know how to do that, and I know I could copy the configs from the LazyVim directory as a starting point, but not sure if I want to get future updates to LazyVim or not, and how to deal with possible conflicts with my customizations.

Couldn't resolve host: github.com when updating plugins

Whenever I try to update plugins every single time it gives me this error message Could not resolve host: github.com
image

I even tried deleting ~/.local/share/nvim, ~/.local/state/nvim and ~/.cache/nvim but still the same issue.

Neovim Version: NVIM v0.10.0-dev

Explain how to configure the plugins

How do i configure the plugins that this automatically installs? I need to configure flash.nvim for instance because I use , as my leader key

Add Dart LSP following the example.lua configuration style

Hi! Excellent work with LazyVim and this starter, congratulations! I want to add Dart Lsp to the example.lua configuration but I don't realize how to do it. I tried multiple ways without any luck. Can you give me a direction on how to resolve it? I made it work with the following code in a separate files inside plugins folder but I want to follow the same structure as in example.lua if possible.

require'lspconfig'.dartls.setup{ 
  cmd = { "dart", 'language-server', '--protocol=lsp' }, 
}

Thanks in advance!

Using neovim 0.9 - colorscheme no longer works.

I have created a .lua file in plugins called catppuccin.lua.

return {
  { "catppuccin/nvim", name = "catppuccin" },
  -- Configure LazyVim to load catppuccin
  {
    "LazyVim/LazyVim",
    opts = {
      colorscheme = "catppuccin",
    },
  },
}

This used to work just fine when using Neovim 0.8. I recently had an issue where one of the plugins that was updated automatically reported that it no longer worked with anything lower than Neovim 0.9. After I upgraded, the colorscheme no longer gets set and everything is bright white now.

Init failed

Follow the tutorial and delete all things, everything is empty, then git clone
But nvim command comes with the error below

Error detected while processing /root/.config/nvim/init.lua:
Invalid plugin spec {
  checker = {
    enabled = true
  },
  defaults = {
    lazy = false,
    version = false
  },
  install = {
    colorscheme = { "tokyonight", "habamax" }
  },
  performance = {
    rtp = {
      disabled_plugins = { "gzip", "tarPlugin", "tohtml", "tutor", "zipPlugin" }
    }
  },
  spec = { { "LazyVim/LazyVim",
      import = "lazyvim.plugins"
    }, {
      import = "plugins"
    } }
}
E5113: Error while calling lua chunk: ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:80: table index is nil
stack traceback:
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:80: in function 'add'
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:116: in function 'normalize'
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:217: in function 'spec'
        ...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/plugin.lua:225: in function 'load'
        /root/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:45: in function 'setup'
        /root/.config/nvim/lua/config/lazy.lua:9: in main chunk
        [C]: in function 'require'
        /root/.config/nvim/init.lua:2: in main chunk

OS: CentOS8
neovim: 0.9.0

Please help with advice on getting Prettierd

I'm new to neovim and lua scripting. I'm using Lazy.nvim starter and just trying to stop null_ls from converting code to double quotes and adding semi-colons.
So I've addedd null_ls.lua file to plugins directory and using the below code but not working?? Any help really appreciated.

return {
"jose-elias-alvarez/null-ls.nvim",
event = "BufReadPre",
dependencies = { "mason.nvim" },
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources, {
nls.builtins.formatting.prettierd.with({
extra_args = {
"--trailing-comma=all",
"--single-quote=true",
"--semi=false",
"--tab-width=2",
"--print-width=80",
"--single-attribute-per-line=true",
"--comma-dangle=always-multiline",
},
}),
nls.builtins.formatting.stylua,
nls.builtins.diagnostics.flake8,
})
end,
}

Parsers not found

Please help me. After running :checkhealth I found out, that not a single treesitter parser got installed right.

Just getting this error message all the time for every single language.:

python(highlights) is concatenated from the following files:
  | [ERROR]:"C:\Users\user\AppData\Local\nvim-data\lazy\nvim-treesitter\queries\python\highlights.scm", failed to load: Failed to load parser for language 'python': uv_dlopen: C:\Users\user\AppData\Local\nvim-data\lazy\nvim-treesitter\parser\python.so is not a valid Win32 application.
- ERROR python(locals): Failed to load parser for language 'python': uv_dlopen: C:\Users\user\AppData\Local\nvim-data\lazy\nvim-treesitter\parser\python.so is not a valid Win32 application.

Here is my nvim --version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1703942320
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1  -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDE_GENERATED_DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"

Run :checkhealth for more info

Did not found something useful on a quick google search...

set lazy.nvim options

I hope it's right to open issues in this place instead of lazyvim/lazyvim
So I couldn't find an example in the docs on how to set lazy.nvim options, specifically the dev option. I tried looking at your personal config in folke/dot repo but it looks like this differs quite a lot from the current starter template.

Config folder ignored when removing { "LazyVim/LazyVim", import = "lazyvim.plugins" }

Hello!
I cloned this repo because I loved the idea of not needing any init.lua files in each and every folder and subfolder.

For installing plugins this worked great! I was able to add new plugins by just creating a file in the plugins folder and configure it.

But i quickly discovered that when I removed the { "LazyVim/LazyVim", import = "lazyvim.plugins" } line to not install the default plugins, the config folder was ignored. Is it possible to get this to work without the default plugins?

I know this starter boilerplate is made for LazyVim, but I would love to use this without the need of the default plugins.

Thanks,
Gnusson

Add requirement for "node" to starter installation instructions

Not everyone has node installed. I followed the instructions as given in https://www.lazyvim.org/ and installed all requirements, but upon initial start of nvim (and all subsequent starts) Mason threw an error for being "unable to install jsonls". Installing node fixed this, though I'm not sure if that's what should be the default.

In any case, I think that if the starter requires node to not throw an error every time, it should at least be mentioned in the requirements if that's OK. Or remove jsonls from the defaults.

Toggle UI

I have trouble making my clipboard working over ssh (complicated and not related to this issue). I found that selecting text with shift is a very easy and working all the way solution, the only problem is that to copy file text only, I have to hide

  1. Line numbers
  2. Indentation signs |
  3. Linting errors
  4. more..

Would be awesome to have a possibility to toggle all UI options off and on. Ideally with Shift down

"module cmp not found" every time I inserted a character

I am new to NVim. I followed the instructions to install LazyVim, and did NOT add any extra configuration.

Every time I inserted a character using NVim, then it would raise an error message:

Failed to source xxx/.local/share/nvim/lazy/cmp-buffer/after/plugin/cmp_buffer.lua
... no field package.preload['cmp']module cmp not found

How to fix it?


OS: macOS 13.2; NVim: 0.8.2

Not working with LazyVim 9

The following error happens with LazyVim 9.x versions:

Failed to load `lazyvim.plugins.core`

...ocal/share/nvim/lazy/Lazyvim/lua/lazyvim/config/init.lua:271: attempt to index field 'LazyVim' (a nil value)

# stacktrace:
  - /Lazyvim/lua/lazyvim/config/init.lua:271 _in_ **init**
  - /Lazyvim/lua/lazyvim/plugins/core.lua:1
  - ~/.config/nvim/lua/config/lazy.lua:9
  - nvim/init.lua:2

The error is in this line:

vim.opt.rtp:append(require("lazy.core.config").spec.plugins.LazyVim.dir)

It seems a problem in the require("lazy").setup code block of lua/config/lazy.lua.

Thanks.

where to put mapleader

-- init.vim
vim.g.mapleader = ','
require("config.lazy")

this doesn't actually work.. my mapleader is still <space> after everything loads. i can get it working by putting my mapleader in a plugin/keys.vim file but then i get this message:

You need to set `vim.g.mapleader` **BEFORE** loading lazy

i'm not sure where to put it to make it work without getting that error message every startup

Tab in insert mode <anonymous>

Which lib was this tab shortcut installed from? How can I remove it? Can someone help me? This creates a conflict when I install copilot :(
image

Telescope current_buffer_fuzzy_find with treesitter crashes

I have had good success with the earlier setup of lazy plugin manager by referencing your dotfiles :)
But as I noticed you have put this starter template out, was giving it a try.

While everything else seems fine. Here's the issue I have run into so far:

I just cloned the starter template and launched nvim
On searching the current buffer using the provided keymap <leader>sb the below error occurs.

This surely isn't a starter/LazyVim specific issue, but it probably relates to the version you might be pulling, hence sharing here.

Error executing Lua callback: ...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:413: attempt to call method '_get_hl_from_capture' (a nil value)
stack traceback:
	...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:413: in function 'v'
	...im/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:529: in function 'v'
	.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:514: in function <.../nvim/lazy/telescope.nvim/lua/telescope/builtin/init.lua:483>
	...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:188: in function 'run_command'
	...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:253: in function 'load_command'
	...ocal/share/nvim/lazy/telescope.nvim/plugin/telescope.lua:109: in function <...ocal/share/nvim/lazy/telescope.nvim/plugin/telescope.lua:108>

This looks more like an issue with the Telescope version in use along with treesitter enabled.
Note: Other Telescope and treesitter features do work.

Let me know if you need more details. Also, if you could help point out what needs to be changed for this to work - in case it's not a generic issue you / others are running into?

I do have ripgrep installed through brew on my mac.

First use of lazy vim cannot init

I follow the guideline : https://www.lazyvim.org/installation
when I start nvim , I got the following error:
Error detected while processing /Users/tbago/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /Users/tbago/.config/nvim/lua/config/lazy.lua:9: module 'lazy' not found:
no field package.preload['lazy']
no file './lazy.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/lazy.lua'
no file '/usr/local/share/lua/5.1/lazy.lua'
no file '/usr/local/share/lua/5.1/lazy/init.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy.lua'
no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/lazy/init.lua'
no file './lazy.so'
no file '/usr/local/lib/lua/5.1/lazy.so'
no file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/lazy.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/Users/tbago/.config/nvim/lua/config/lazy.lua:9: in main chunk
[C]: in function 'require'
/Users/tbago/.config/nvim/init.lua:2: in main chunk

The cursor shape doesn't restore to the terminal setting when I quit neovim

I set the cursor shape to vertical bar in iTerm2. When I quit neovim, the cursor shape is box. I searched in Stack Overflow for a while and tried different ways to set guicursor, but the problem is still there. I wonder how to change the cursor shape back to vertical bar when I quit neovim and return to the terminal.

  • Neovim: 0.8.3
  • LazyVim: 1.9.1
  • macOS: 13.2
  • iTerm2: 3.4.19

Not found lazy.nvim

I clone lazy.nvim in ~/.local/share/nvim (vim.fn.stdpath("data") print this path), join /lazy/lazy.nvim, rtp.prepend lazypath, and then require(lazy.nvim), nvim produce the following errors. how to fix ?

image image

License should probably be CC0

Currently configurations based on this template can only be distributed under the terms of the Apache License 2.0. CC0 would enable distribution under user's chosen license.

The ignore rule for configuring pylsp has not taken effect. I would like to know the correct way

Below is my configuration lua/plugins/lsp.lua

return {
  {
    "neovim/nvim-lspconfig",
    ---@class PluginLspOpts
    opts = {
      ---@type lspconfig.options
      servers = {
        -- pylsp will be automatically installed with mason and loaded with lspconfig
        pylsp = {
          settings = {
            pycodestyle = {
              ignore = {"E501", "E402"},  -- Ignore E501 error
            },
          }
        },
      },
      -- you can do any additional lsp server setup here
      -- return true if you don't want this server to be setup with lspconfig
      ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
      setup = {
        -- Specify * to use this function as a fallback for any server
        -- ["*"] = function(server, opts) end,
      },
    },
  },
}

image

How can I use "LazyVim starter" with dot file manager like Chezmoi?

I cloned every Nvim config introduced from the document.

git clone https://github.com/LazyVim/starter ~/.config/nvim

And I feel... WOW! ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ’ฏ

At this moment everything is just perfect, but I need some custom things and should manage it.

Any suggestions?

TAB key does not work as before

I'm new to lazyvim and have been using a version installed months ago.
Recently i have tried updated lazyvim, and I found the TAB key does not work well.

It gives some error like:

E5108: Error executing lua: ...ng/nvim-data/lazy/LazyVim/lua/lazyvim/plugins/coding.lua:100: attempt to index field 'snippet' (a nil value)
stack traceback:
	...ng/nvim-data/lazy/LazyVim/lua/lazyvim/plugins/coding.lua:100: in function <...ng/nvim-data/lazy/LazyVim/lua/lazyvim/plugins/coding.lua:99>

I've tried reinstalled and it does not help.

nvim crashes instantly after installing lazy starter

Dear authors,

I'd love to try out lazy, as it has so many features out of the box. On my local machine installation worked without any issues. However, on our scientific cluster it instantly crashes when opening nvim again after lazy installation. I tried all versions of nvim supported by lazy, but always the same crash.
Before installation, i removed everything from .config/nvim and .local/share/bin/nvim. I'm far from beeing a vim or nvim expert, I can't even provide you an error log as I don't know where to look for it (?).
Any help is appreciated! Thank you in advance!

Overriding Certain Keybinds (CodeLens)

I am currently customizing my lazyvim starter setup a little bit and for that i added chatgpt.nvim.

In order to use it the way i want it i was adding which-key descriptions in order to use it and also have a reference.

I, for my needs wanted to use chatgpt by mapping it to c in order to open the menu for the different commands, for which i want to use these mappings:

c = {
  name = "ChatGPT",
    c = { "<cmd>ChatGPT<CR>", "ChatGPT" },
    e = { "<cmd>ChatGPTEditWithInstruction<CR>", "Edit with instruction", mode = { "n", "v" } },
    g = { "<cmd>ChatGPTRun grammar_correction<CR>", "Grammar Correction", mode = { "n", "v" } },
    t = { "<cmd>ChatGPTRun translate<CR>", "Translate", mode = { "n", "v" } },
    k = { "<cmd>ChatGPTRun keywords<CR>", "Keywords", mode = { "n", "v" } },
    d = { "<cmd>ChatGPTRun docstring<CR>", "Docstring", mode = { "n", "v" } },
    a = { "<cmd>ChatGPTRun add_tests<CR>", "Add Tests", mode = { "n", "v" } },
    o = { "<cmd>ChatGPTRun optimize_code<CR>", "Optimize Code", mode = { "n", "v" } },
    s = { "<cmd>ChatGPTRun summarize<CR>", "Summarize", mode = { "n", "v" } },
    f = { "<cmd>ChatGPTRun fix_bugs<CR>", "Fix Bugs", mode = { "n", "v" } },
    x = { "<cmd>ChatGPTRun explain_code<CR>", "Explain Code", mode = { "n", "v" } },
    r = { "<cmd>ChatGPTRun roxygen_edit<CR>", "Roxygen Edit", mode = { "n", "v" } },
    l = { "<cmd>ChatGPTRun code_readability_analysis<CR>", "Code Readability Analysis", mode = { "n", "v" } },
  },

the issue that evolved is that c is already a predefined command (opening the +code keymappings), and oddly, i just cant remap cc to run chatgpt, it always runs codeLens (which is the default action that runs when using this keybind). although i remapped codelens in my keymaps to another command (cl) and also remapped other commands conflicting with the way i want to use chatgpt.

here is my current keymaps.lua file (showing the changed snippets):

---- adding custom which-key ---------
local wk = require("which-key")
wk.register({
  c = {
    name = "+code",
    l = { "vim.lsp.codelens.run", "Run Codelens", mode = { "n", "v" }, has = "codeLens" },
    c = { "<cmd>ChatGPT<CR>", "ChatGPT", mode = { "n", "v" } },
    L = { "vim.lsp.codelens.refresh", "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" },
    i = { "<cmd>LspInfo<cr>", "Lsp Info" },
    C = {
      name = "ChatGPT",
      e = { "<cmd>ChatGPTEditWithInstruction<CR>", "Edit with instruction", mode = { "n", "v" } },
      g = { "<cmd>ChatGPTRun grammar_correction<CR>", "Grammar Correction", mode = { "n", "v" } },
      t = { "<cmd>ChatGPTRun translate<CR>", "Translate", mode = { "n", "v" } },
      k = { "<cmd>ChatGPTRun keywords<CR>", "Keywords", mode = { "n", "v" } },
      d = { "<cmd>ChatGPTRun docstring<CR>", "Docstring", mode = { "n", "v" } },
      a = { "<cmd>ChatGPTRun add_tests<CR>", "Add Tests", mode = { "n", "v" } },
      o = { "<cmd>ChatGPTRun optimize_code<CR>", "Optimize Code", mode = { "n", "v" } },
      s = { "<cmd>ChatGPTRun summarize<CR>", "Summarize", mode = { "n", "v" } },
      f = { "<cmd>ChatGPTRun fix_bugs<CR>", "Fix Bugs", mode = { "n", "v" } },
      x = { "<cmd>ChatGPTRun explain_code<CR>", "Explain Code", mode = { "n", "v" } },
      r = { "<cmd>ChatGPTRun roxygen_edit<CR>", "Roxygen Edit", mode = { "n", "v" } },
      l = { "<cmd>ChatGPTRun code_readability_analysis<CR>", "Code Readability Analysis", mode = { "n", "v" } },
    },
  },
}, { prefix = "<leader>" })
--------------------------------------

---- CodeLens ------------------------
vim.keymap.set({ "n", "v" }, "<leader>cl", "vim.lsp.codelens.run", { desc = "Run Codelens" })
vim.keymap.set({ "n", "v" }, "<leader>cL", "vim.lsp.codelens.refresh", { desc = "Refresh & Display Codelens" })
--------------------------------------

---- ChatGPT  ------------------------
vim.keymap.set("n", "<leader>cc", "<cmd>ChatGPT<CR>", { desc = "ChatGPT" })
vim.keymap.set("v", "<leader>cc", "<cmd>ChatGPT<CR>", { desc = "ChatGPT" })

why does this way not overwrite the codelens keymaps, while on the other hand successfully remapping ci to show LspInfo (default = cl).

Do i need to change the codelens keymaps somewhere else or am i doing something wrong in remapping it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.