diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-04-11 16:00:13 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-04-11 16:00:13 +0200 |
| commit | 9748abe38cb64bfa388c3f5d441b3779f425cfdf (patch) | |
| tree | 58386f866bfbec3c8579e6d3324445f58eb6d01d /config | |
| parent | 7c36e04c36413c0469bc9f2a329ad362735a0ecf (diff) | |
| parent | 957e0f6119ab3681e02029cdd98d0a1bc3bbe092 (diff) | |
Merge branch 'main' of git.sr.ht:~rbdr/dotfiles
Diffstat (limited to 'config')
| -rw-r--r-- | config/nvim/colors/tranquil.vim | 32 | ||||
| -rw-r--r-- | config/nvim/init.lua | 2 | ||||
| -rw-r--r-- | config/nvim/lazy-lock.json | 19 | ||||
| -rw-r--r-- | config/nvim/lua/dap_config.lua | 30 | ||||
| -rw-r--r-- | config/nvim/lua/lsp.lua | 23 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 22 |
6 files changed, 83 insertions, 45 deletions
diff --git a/config/nvim/colors/tranquil.vim b/config/nvim/colors/tranquil.vim index 30d13ba..e068f7e 100644 --- a/config/nvim/colors/tranquil.vim +++ b/config/nvim/colors/tranquil.vim @@ -2,11 +2,11 @@ " " Name: tranquil.vim " Maintainer: Rubén Beltrán del Río <ben@nsovocal.com> -" Last Change: 19 Apr 2024 +" Last Change: 05 Mar 2025 " License: public domain -" Version: 1.0 +" Version: 1.1.0 " -" 256 color scheme using (almost) CGA colors +" 256 color scheme using tranquil systems palette set background=dark hi clear @@ -112,4 +112,28 @@ hi WildMenu guifg=#80FFCC guibg=#0F261F hi CursorLine guibg=#FFFFFFFF hi ColorColumn guifg=#FFFFFF guibg=#FA3B00 -hi WhichKeyDesc guifg=#0F261F +" WhichKey +hi WhichKeyNormal guibg=#0F261F +hi WhichKeyBorder guibg=#23C17C guifg=#FFFFFF +hi WhichKeyDesc guifg=#90A6A2 +hi WhichKeyGroup guifg=#23C17C +hi WhichKeyIcon guibg=#0F261F guifg=#FA2B00 +hi WhichKeyIconAzure guibg=#0F261F guifg=#FFB4F0 +hi WhichKeyIconBlue guibg=#0F261F guifg=#4F8FE6 +hi WhichKeyIconCyan guibg=#0F261F guifg=#80FFCC +hi WhichKeyIconGreen guibg=#0F261F guifg=#23C17C +hi WhichKeyIconGrey guibg=#0F261F guifg=#90A6A2 +hi WhichKeyIconOrange guibg=#0F261F guifg=#FFCFC4 +hi WhichKeyIconPurple guibg=#0F261F guifg=#FF616B +hi WhichKeyIconRed guibg=#0F261F guifg=#FA2B00 +hi WhichKeyIconYellow guibg=#0F261F guifg=#FAED8F +hi WhichKeySeparator guifg=#B5D1CC +hi WhichKeyTitle guifg=#23C17C + +" LSP Related +hi LspInlayHint guifg=#90A6A2 +hi DiagnosticError guifg=#FFFFFF guibg=#FA2B00 +hi DiagnosticWarn guifg=#0F261F guibg=#FAED8F +hi DiagnosticInfo guifg=#FFFFFF guibg=#4F8FE6 +hi DiagnosticHint guifg=#0F261F guibg=#FFB4F0 +hi DiagnosticUnderlineError gui=undercurl guisp=#FA2B00 diff --git a/config/nvim/init.lua b/config/nvim/init.lua index e1e61f6..f614402 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -91,7 +91,7 @@ pcall(require, 'init_local') ------------------------------------------------------------------------------- -- FZF vim.keymap.set('n', '<c-P>', - "<cmd>lua require('fzf-lua').files({ fzf_opts = {} })<CR>", { silent = true }) + "<cmd>lua require('fzf-lua').files({cmd = \"rg --files --hidden -g !.git\"})<CR>", { silent = true }) -- Toggle Autosave vim.api.nvim_set_keymap('n', '<leader>n', ':ASToggle<CR>', {}) diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 9188dea..764c9ed 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,22 +1,21 @@ { "LargeFile": { "branch": "master", "commit": "3941a37b2b0288524300348a39521a46539bf9f6" }, - "auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" }, - "coq_nvim": { "branch": "coq", "commit": "e48a17c63029ef9ac72af80a7a3a56577acffb00" }, - "fzf-lua": { "branch": "main", "commit": "aeff8132009a7fc55c6c43bca4288d5ba26a5393" }, + "coq_nvim": { "branch": "coq", "commit": "d83bc18d044cfcd65e91dc49740a353546bc143b" }, + "fzf-lua": { "branch": "main", "commit": "47b85a25c0c0b2c20b4e75199ed01bb71e7814f5" }, "gemini.vim": { "branch": "master", "commit": "c9efb59c97b71c28d4678c79fd21fbdd3a69d196" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "neogen": { "branch": "main", "commit": "05d754004da8c89115b291f2a23ca530a8cac8fd" }, "nota.nvim": { "branch": "main", "commit": "503bfaa93968986a9df5376c4543207c70dd2a07" }, - "nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" }, - "nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" }, + "nvim-autopairs": { "branch": "master", "commit": "2a406cdd8c373ae7fe378a9e062a5424472bd8d8" }, + "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, - "nvim-lspconfig": { "branch": "master", "commit": "fb733ac734249ccf293e5c8018981d4d8f59fa8f" }, + "nvim-lspconfig": { "branch": "master", "commit": "4ea9083b6d3dff4ddc6da17c51334c3255b7eba5" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "5f38dffb6a07669a678f073bfe0f62b1a020dffc" }, - "nvim-treesitter-endwise": { "branch": "master", "commit": "57d52841a966be6ff9a998a6d3dc1ac9cc9d95fc" }, - "oil.nvim": { "branch": "master", "commit": "ab887d926c2665a708fbe9e6c4654042cc5f4c60" }, + "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, + "nvim-treesitter-endwise": { "branch": "master", "commit": "63a8f855c6b6019ef9f7f63b5c59b8a00c215d0d" }, + "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" }, "oleoboard.nvim": { "branch": "main", "commit": "3652b39db3a8faca3fb767ace799479124bc79f3" }, "snes-syntax-vim": { "branch": "master", "commit": "a6a699c8905f7b6119bf91e44f960667d9f03d59" }, "tree-sitter-api-notation": { "branch": "main", "commit": "3113c6077d9ed1e662a891714ac00e1ee3bb7657" }, 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', |