feat(dev plugins): update plugins configs for developing
This commit is contained in:
parent
d35acd0125
commit
ff20726ade
|
@ -89,6 +89,7 @@ cmp.setup{
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require('nvim-ts-autotag').setup({
|
require('nvim-ts-autotag').setup({
|
||||||
opts = {
|
opts = {
|
||||||
enable_close = true,
|
enable_close = true,
|
||||||
enable_rename = true,
|
enable_rename = true,
|
||||||
enable_close_on_slash = false
|
enable_close_on_slash = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,88 +1,88 @@
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
|
|
||||||
require("dap-vscode-js").setup({
|
require("dap-vscode-js").setup({
|
||||||
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug",
|
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug",
|
||||||
debugger_cmd = { "js-debug-adapter" },
|
debugger_cmd = { "js-debug-adapter" },
|
||||||
adapters = { 'node-terminal' },
|
adapters = { 'node-terminal' },
|
||||||
})
|
})
|
||||||
|
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = "Launch file",
|
name = "Launch file",
|
||||||
type = "codelldb",
|
type = "codelldb",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
end,
|
end,
|
||||||
cwd = '${workspaceFolder}',
|
cwd = '${workspaceFolder}',
|
||||||
stopOnEntry = false,
|
stopOnEntry = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.c = dap.configurations.cpp
|
dap.configurations.c = dap.configurations.cpp
|
||||||
dap.configurations.rust = dap.configurations.cpp
|
dap.configurations.rust = dap.configurations.cpp
|
||||||
|
|
||||||
dap.adapters["pwa-node"] = {
|
dap.adapters["pwa-node"] = {
|
||||||
type = "server",
|
type = "server",
|
||||||
host = "localhost",
|
host = "localhost",
|
||||||
port = "${port}",
|
port = "${port}",
|
||||||
executable = {
|
executable = {
|
||||||
command = "node",
|
command = "node",
|
||||||
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"},
|
args = { os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.javascript = {
|
dap.configurations.javascript = {
|
||||||
{
|
{
|
||||||
type = "pwa-node",
|
type = "pwa-node",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
name = "Launch file",
|
name = "Launch file",
|
||||||
program = "${file}",
|
program = "${file}",
|
||||||
cwd = "${workspaceFolder}",
|
cwd = "${workspaceFolder}",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.adapters.chrome = {
|
dap.adapters.chrome = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "node",
|
command = "node",
|
||||||
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js"},
|
args = { os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" },
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.adapters.firefox = {
|
dap.adapters.firefox = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = 'node',
|
command = 'node',
|
||||||
args = {os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js'},
|
args = { os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js' },
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.typescriptreact = {
|
dap.configurations.typescriptreact = {
|
||||||
{
|
{
|
||||||
name = 'Next.js: debug server-side',
|
name = 'Next.js: debug server-side',
|
||||||
type = "pwa-node",
|
type = "pwa-node",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
runtimeExecutable = "npm",
|
runtimeExecutable = "npm",
|
||||||
runtimeArgs = { "run", "dev" },
|
runtimeArgs = { "run", "dev" },
|
||||||
cwd = "${workspaceFolder}",
|
cwd = "${workspaceFolder}",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "Next.js: debug client-side with chrome",
|
name = "Next.js: debug client-side with chrome",
|
||||||
type = "chrome",
|
type = "chrome",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
url = "http://localhost:3000"
|
url = "http://localhost:3000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "Next.js: debug client-side with firefox",
|
name = "Next.js: debug client-side with firefox",
|
||||||
type = "firefox",
|
type = "firefox",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
url = 'http://localhost:3000',
|
url = 'http://localhost:3000',
|
||||||
webRoot = '${workspaceFolder}',
|
webRoot = '${workspaceFolder}',
|
||||||
firefoxExecutable = '/usr/bin/waterfox',
|
firefoxExecutable = '/usr/bin/waterfox',
|
||||||
pathMappings = {
|
pathMappings = {
|
||||||
{
|
{
|
||||||
url = "webpack://_n_e/",
|
url = "webpack://_n_e/",
|
||||||
path = "${workspaceFolder}/"
|
path = "${workspaceFolder}/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.javascriptreact = dap.configurations.typescriptreact;
|
dap.configurations.javascriptreact = dap.configurations.typescriptreact;
|
||||||
|
@ -91,9 +91,9 @@ require("dapui").setup()
|
||||||
|
|
||||||
local dap, dapui = require("dap"), require("dapui")
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
|
||||||
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
dapui.open({})
|
dapui.open({})
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle)
|
vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle)
|
||||||
|
|
||||||
|
|
|
@ -1,50 +1,52 @@
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
lspconfig.clangd.setup({})
|
||||||
|
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
hint = {
|
hint = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.eslint.setup({
|
lspconfig.eslint.setup({
|
||||||
settings = {
|
settings = {
|
||||||
codeActionOnSave = {
|
codeActionOnSave = {
|
||||||
enable = true,
|
enable = true,
|
||||||
mode = "all",
|
mode = "all",
|
||||||
},
|
},
|
||||||
format = true,
|
format = true,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.ts_ls.setup({
|
lspconfig.ts_ls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHints = true,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
includeInlayEnumMemberValueHints = true,
|
includeInlayEnumMemberValueHints = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
javascript = {
|
javascript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
includeInlayVariableTypeHints = true,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
includeInlayEnumMemberValueHints = true,
|
includeInlayEnumMemberValueHints = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,25 +1,22 @@
|
||||||
local navic = require("nvim-navic")
|
local navic = require("nvim-navic")
|
||||||
|
|
||||||
vim.g.rustaceanvim = {
|
vim.g.rustaceanvim = {
|
||||||
tools = {
|
|
||||||
autoSetHints = true,
|
|
||||||
inlay_hints = {
|
|
||||||
show_parameter_hints = true,
|
|
||||||
parameter_hints_prefix = "in: ", -- "<- "
|
|
||||||
other_hints_prefix = "out: " -- "=> "
|
|
||||||
}
|
|
||||||
},
|
|
||||||
server = {
|
server = {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
navic.attach(client, bufnr)
|
navic.attach(client, bufnr)
|
||||||
end,
|
end,
|
||||||
settings = {
|
settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
|
procMacro = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
assist = {
|
assist = {
|
||||||
importEnforceGranularity = true,
|
importEnforceGranularity = true,
|
||||||
importPrefix = "create"
|
importPrefix = "create"
|
||||||
},
|
},
|
||||||
cargo = { allFeatures = true },
|
cargo = {
|
||||||
|
allFeatures = true,
|
||||||
|
},
|
||||||
checkOnSave = {
|
checkOnSave = {
|
||||||
command = "clippy",
|
command = "clippy",
|
||||||
allFeatures = true
|
allFeatures = true
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
ensure_installed = { 'rust', 'c', 'lua', 'tsx', 'javascript', 'typescript' },
|
ensure_installed = { 'rust', 'c', 'lua', 'tsx', 'javascript', 'typescript' },
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
},
|
||||||
|
autotag = {
|
||||||
|
enable = true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue