Skip to content
Discussion options

You must be logged in to vote

Ok I was wrong in my previous comment because I didn't have a json LSP server attached to the buffer that i tested, so the LSP mappings were not in effect and that's why it worked by mistake. You could try the following

  {
    "neovim/nvim-lspconfig",
    opts = function()
      local Keys = require("lazyvim.plugins.lsp.keymaps").get()

      vim.api.nvim_create_autocmd("LspAttach", {
        group = vim.api.nvim_create_augroup("js_keys", {}),
        desc = "JS keys",
        callback = function(ev)
          if vim.bo[ev.buf].filetype == "javascript" then
            vim.list_extend(Keys, {
              {
                "<leader>cR",
                false,
              },
          …

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@kapral18
Comment options

@kapral18
Comment options

@dpetka2001
Comment options

@dpetka2001
Comment options

Answer selected by kapral18
@kapral18
Comment options

@kapral18
Comment options

@dpetka2001
Comment options

@firubat
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants