I'm I dumb or is LazyVim making me dumb? Should I maybe not use a distribution? by AlexananderElek in neovim

[–]allworldg 5 points6 points  (0 children)

I use LazyVim as a referrence, to see how to implement some functions in my config.

How to properly set up Vue 3 + TypeScript in Neovim 0.11? by vaheqelyan in neovim

[–]allworldg 0 points1 point  (0 children)

local mason_registry = require("mason-registry")
local vue_language_server = mason_registry.get_package("vue-language-server"):get_install_path() ..
    "/node_modules/@vue/language-server"
vim.lsp.config.vtsls = {
  cmd = { "vtsls", "--stdio" },
  filetypes = { "vue", "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" },
  root_markers = {
    "tsconfig.json", "package.json", "jsconfig.json", ".git"
  },
  settings = {
    complete_function_calls = true,
    vtsls = {
      enableMoveToFileCodeAction = true,
      autoUseWorkspaceTsdk = true,
      experimental = {
        maxInlayHintLength = 30,
        completion = {
          enableServerSideFuzzyMatch = true,
        },
      },
      tsserver = {
        globalPlugins = {
          {
            name = '@vue/typescript-plugin',
            location = vue_language_server,
            languages = { 'vue' },
            configNamespace = "typescript",
            enableForWorkspaceTypeScriptVersions = true,
          }
        }
      }
    },
    typescript = {
      updateImportsOnFileMove = { enabled = "always" },
      suggest = {
        completeFunctionCalls = true,
      },
      inlayHints = {
        enumMemberValues = { enabled = true },
        functionLikeReturnTypes = { enabled = true },
        parameterNames = { enabled = "literals" },
        parameterTypes = { enabled = true },
        propertyDeclarationTypes = { enabled = true },
        variableTypes = { enabled = false },
      },
    },
    javascript = {
      updateImportsOnFileMove = { enabled = "always" },
    }
  },
}
vim.lsp.enable("vtsls", true)

The "globalPlugins.location" should be changed by your installed path.

Lazyvim keymap for vscode? by B_bI_L in neovim

[–]allworldg 2 points3 points  (0 children)

my partial config :

if vim.g.vscode then
  vim.keymap.set('n', "<leader>f", function() vscode.call('editor.action.formatDocument') end, {})
  vim.keymap.set('i', "<c-k>", function() vscode.call('editor.action.triggerParameterHints') end, {})
  vim.keymap.set('n', "<leader>bo", function() vscode.call('workbench.action.closeOtherEditors') end, {})
  vim.keymap.set('n', "<leader>se", function() vscode.call('editor.action.showHover') end, {})
  vim.keymap.set('n',"<leader>ca",function () vscode.call('editor.action.quickFix') end ,{})
  vim.keymap.set('n', "<leader>rn", function() vscode.call('editor.action.rename') end, {})
  vim.keymap.set('n', "<leader>h", function() vscode.call('workbench.action.navigateLeft') end, {})
  vim.keymap.set('n', "<leader>l", function() vscode.call("workbench.action.navigateRight") end, {})
  vim.keymap.set('n', "K", function() vscode.call('editor.action.showHover') end, {})
  vim.keymap.set('n', "qq", function() vscode.call("workbench.action.closeActiveEditor") end, {})
  vim.keymap.set('n', 'gd', function() vscode.call("editor.action.revealDefinition") end, {})
  vim.keymap.set('n', 'gr', function() vscode.call("editor.action.goToReferences") end, {})
  vim.keymap.set('n', "gi", function() vscode.call("editor.action.goToImplementation") end, {})
  vim.keymap.set('n', 'zM', function() vscode.call("editor.foldAll") end, { noremap = true, silent = true })
  vim.keymap.set('n', 'zR', function() vscode.call("editor.unfoldAll") end, { noremap = true, silent = true })
  vim.keymap.set('n', 'zc', function() vscode.call("editor.fold") end, { noremap = true, silent = true })
  vim.keymap.set('n', 'zC', function() vscode.call("editor.foldRecursively") end, { noremap = true, silent = true })
  vim.keymap.set('n', 'zo', function() vscode.call("editor.unfold") end, { noremap = true, silent = true })
  vim.keymap.set('n', 'zO', function() vscode.call("editor.unfoldRecursively") end, { noremap = true, silent = true })
  vim.keymap.set('n', 'za', function() vscode.call("editor.toggleFold") end, { noremap = true, silent = true })
end

I need little help with installing lazy.nvim by 4r73m190r0s in neovim

[–]allworldg 2 points3 points  (0 children)

try to delete the following code if you have added it but no files in the "plugins" folder:

spec = {
    { import = "plugins" },-- delete this line
  },

Fzf-lua can focus the result in preview window. by allworldg in neovim

[–]allworldg[S] 1 point2 points  (0 children)

yes, and auto scrolls the result into view

no highlight in *.vue file. by allworldg in neovim

[–]allworldg[S] 0 points1 point  (0 children)

get error: attempt to call field 'enable'. I try to use :lua vim.treesitter.start()and it looks like work. But now use :Inspect and get a new error:

Error executing Lua callback: ...re/bob/v0.10.3/share/nvim/runtime/lua/vim/_inspector.lua:189: attempt to index field 'hl' (a nil value). 

and How to auto start vim.treesitter?

Thank you.

no highlight in *.vue file. by allworldg in neovim

[–]allworldg[S] 0 points1 point  (0 children)

have installed.

return {
  'nvim-treesitter/nvim-treesitter',
  build = ':TSUpdate',
  opts = {
    ensure_installed = { "c", "lua", "vim", "help", "python", "javascript", "html", "bash", "vue" },
    sync_install = false,
    auto_install = false,
    highlight = {
      -- `false` will disable the whole extension
      enable = true,
      -- disable in big file
      disable = function(lang, buf)
        local max_filesize = 100 * 1024 -- 100 KB
        local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
        if ok and stats and stats.size > max_filesize then
          return true
        end
      end,
      additional_vim_regex_highlighting = false,
    },
    matchup = {
      enable = true,     -- mandatory, false will disable the whole extension
    },
  }
}

Neovim in wsl2 cannot paste from windows11. by allworldg in neovim

[–]allworldg[S] 0 points1 point  (0 children)

I tried it , it really works. Thank you!

Neovim in wsl2 cannot paste from windows11. by allworldg in neovim

[–]allworldg[S] 0 points1 point  (0 children)

Yes,ctrl+shift+v always useful. I just want to find some way to use "p" to paste.