aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-04-11 16:00:13 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-04-11 16:00:13 +0200
commit9748abe38cb64bfa388c3f5d441b3779f425cfdf (patch)
tree58386f866bfbec3c8579e6d3324445f58eb6d01d /config/nvim/lua
parent7c36e04c36413c0469bc9f2a329ad362735a0ecf (diff)
parent957e0f6119ab3681e02029cdd98d0a1bc3bbe092 (diff)
Merge branch 'main' of git.sr.ht:~rbdr/dotfiles
Diffstat (limited to 'config/nvim/lua')
-rw-r--r--config/nvim/lua/dap_config.lua30
-rw-r--r--config/nvim/lua/lsp.lua23
-rw-r--r--config/nvim/lua/plugins.lua22
3 files changed, 45 insertions, 30 deletions
diff --git a/config/nvim/lua/dap_config.lua b/config/nvim/lua/dap_config.lua
index b84af74..9d9fa64 100644
--- a/config/nvim/lua/dap_config.lua
+++ b/config/nvim/lua/dap_config.lua
@@ -6,25 +6,35 @@ vim.keymap.set('n', '<leader>d', function()
end)
require("dap-vscode-js").setup({
- debugger_path = os.getenv('HOME') .. '/projects/tools/vscode-js-debug/out/adapter.bundle.js',
+ debugger_path = os.getenv('HOME') .. '/projects/vendor/vscode-js-debug/out/adapter.bundle.js',
adapters = { 'pwa-node', 'node-terminal' },
})
+require("dap").adapters["pwa-node"] = {
+ type = 'server',
+ host = 'localhost',
+ port = '${port}',
+ executable = {
+ command = 'node',
+ -- 💀 Make sure to update this path to point to your installation
+ args = { os.getenv('HOME') .. '/projects/vendor/vscode-js-debug/src/dapDebugServer.ts', '${port}' },
+ }
+}
+
dap.configurations.javascript = {
{
type = "pwa-node",
- request = "launch",
- name = "Launch file",
- program = "${file}",
+ request = "attach",
+ name = "Attach",
cwd = "${workspaceFolder}",
},
{
type = "pwa-node",
- request = "attach",
- name = "Attach",
- processId = require'dap.utils'.pick_process,
+ request = "launch",
+ name = "Launch file",
+ program = "${file}",
cwd = "${workspaceFolder}",
- }
+ },
}
dap.adapters.firefox = {
@@ -108,7 +118,3 @@ dap.configurations.python = {
end;
},
}
-
-require('neodev').setup({
- library = { plugins = { "nvim-dap-ui" }, types = true }
-})
diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua
index e74a330..7dfb050 100644
--- a/config/nvim/lua/lsp.lua
+++ b/config/nvim/lua/lsp.lua
@@ -11,8 +11,29 @@ lspconfig.dartls.setup(coq.lsp_ensure_capabilities({}))
lspconfig.rust_analyzer.setup(coq.lsp_ensure_capabilities({
-- Server-specific settings. See `:help lspconfig-setup`
settings = {
- ['rust-analyzer'] = {},
+ ['rust-analyzer'] = {
+ imports = {
+ granularity = {
+ group = "module",
+ },
+ prefix = "self",
+ },
+ cargo = {
+ buildScripts = {
+ enable = true,
+ },
+ },
+ procMacro = {
+ enable = true
+ },
+ checkOnSave = {
+ command = "clippy"
+ }
+ },
},
+ on_attach = function(client, bufnr)
+ vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
+ end
}))
lspconfig.lua_ls.setup(coq.lsp_ensure_capabilities({}))
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua
index e4dadf6..882c76d 100644
--- a/config/nvim/lua/plugins.lua
+++ b/config/nvim/lua/plugins.lua
@@ -56,7 +56,6 @@ require('lazy').setup({
-- Syntaxes
'ARM9/snes-syntax-vim',
'https://git.sr.ht/~torresjrjr/gemini.vim',
- { 'folke/neodev.nvim', opts = {} },
--'Debugging
{
@@ -78,21 +77,6 @@ require('lazy').setup({
},
'michaeljsmith/vim-indent-object',
{
- 'Pocco81/auto-save.nvim',
- opts = {
- condition = function(buf)
- local fn = vim.fn
- local utils = require('auto-save.utils.data')
-
- if fn.getbufvar(buf, '&modifiable') == 1
- and utils.not_in(fn.getbufvar(buf, '&filetype'), {'oil'}) then
- return true
- end
- return false
- end,
- }
- },
- {
'danymat/neogen',
config = true
},
@@ -103,7 +87,11 @@ require('lazy').setup({
-- LSP
'neovim/nvim-lspconfig',
- 'folke/neodev.nvim',
+ {
+ "folke/lazydev.nvim",
+ ft = "lua",
+ opts = {},
+ },
-- Tools
'mbbill/undotree',