diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2026-08-01 21:11:10 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2026-08-01 21:11:10 +0100 |
| commit | cb4f63cb35ad00a95646633f33f25096ed72e0ac (patch) | |
| tree | 3587b7d0dfc77f4350f1b3e3e103d7e3f535cdd1 | |
| parent | 6a564cd3e7259fd327e1883d658d93b219ca0f37 (diff) | |
| parent | a0e37ee21395753620f1fa00edcfc68b8f005c28 (diff) | |
Merge branch 'main' into howlhowl
| -rw-r--r-- | bookmarks.txt | 3 | ||||
| -rw-r--r-- | nvim/.config/nvim/ftplugin/asm.lua | 26 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/config/keymaps.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/conform.lua | 1 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/nvim-treesitter.lua | 1 |
5 files changed, 32 insertions, 1 deletions
diff --git a/bookmarks.txt b/bookmarks.txt index cca5abb..7be6a1d 100644 --- a/bookmarks.txt +++ b/bookmarks.txt @@ -7,3 +7,6 @@ vlink|http://sun.hasenbraten.de/vlink/index.php?view=main motion canvas|https://motion-canvas.io/ studio|http://localhost:9000/ nix options|https://search.nixos.org/options +sh.c|https://gitlab.com/xv6-64/xv6-64/-/blob/main/sh.c?ref_type=heads +randm (old) tech site|https://www.edsa.uk/blog/ +sadlersmtp|https://box.sadlersmtp.com/ diff --git a/nvim/.config/nvim/ftplugin/asm.lua b/nvim/.config/nvim/ftplugin/asm.lua new file mode 100644 index 0000000..6fd271e --- /dev/null +++ b/nvim/.config/nvim/ftplugin/asm.lua @@ -0,0 +1,26 @@ +-- https://github.com/grahambates/m68k-lsp +-- Guard check: Only boot the server if the binary is visible in the current shell. +if vim.fn.executable("m68k-lsp-server") == 1 then + vim.lsp.start({ + name = "m68k-lsp", + cmd = { "m68k-lsp-server", "--stdio" }, + root_dir = vim.fs.dirname(vim.fs.find({ ".git", "shell.nix" }, { upward = true })[1]), + init_options = { + processors = { "mc68000" }, + vasm = { + provideDiagnostics = true, + binPath = "vasmm68k_mot", + args = { "-devpac", "-Fhunk" }, + }, + }, + }) +else + vim.diagnostic.set(vim.api.nvim_create_namespace("m68k_notice"), vim.api.nvim_get_current_buf(), { + { + lnum = 0, + col = 0, + severity = vim.diagnostic.severity.WARN, + message = "Amiga Assembler detected, but m68k-lsp-server was not found. Did you forget to enter the nix-shell?", + }, + }) +end diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua index a9bf961..f4e1706 100644 --- a/nvim/.config/nvim/lua/config/keymaps.lua +++ b/nvim/.config/nvim/lua/config/keymaps.lua @@ -247,7 +247,7 @@ end, { desc = "Quickfix List" }) -- Language Formatting and Linting. set("n", "<leader>lf", function() - require("conform").format({ bufnr = 0 }) + require("conform").format({ bufnr = 0, lsp_format = "fallback" }) end, { desc = "Format File" }) set("n", "<leader>ll", function() require("lint").try_lint() diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua index 94bdb06..dec12cc 100644 --- a/nvim/.config/nvim/lua/plugins/conform.lua +++ b/nvim/.config/nvim/lua/plugins/conform.lua @@ -12,6 +12,7 @@ require("conform").setup({ typescript = { "biome", "prettier", stop_after_first = true }, javascriptreact = { "biome", "prettier", stop_after_first = true }, typescriptreact = { "biome", "prettier", stop_after_first = true }, + asm = { "lsp" }, }, formatters = { php_cs_fixer = { diff --git a/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua b/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua index e646c1b..8a1a474 100644 --- a/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -1,6 +1,7 @@ vim.pack.add({ "https://github.com/nvim-treesitter/nvim-treesitter" }) require("nvim-treesitter").install({ + "asm", "bash", "git_config", "git_rebase", |
