]> git.frustrated-labs.net Git - dotfiles.git/commitdiff
feat: add diagnostics configuration
authorAlexander Goussas <[email protected]>
Mon, 14 Jul 2025 05:35:01 +0000 (00:35 -0500)
committerAlexander Goussas <[email protected]>
Mon, 14 Jul 2025 05:35:01 +0000 (00:35 -0500)
nvim/.config/nvim/init.lua
nvim/.config/nvim/lua/autocmds.lua
nvim/.config/nvim/lua/diagnostics.lua [new file with mode: 0644]
nvim/.config/nvim/syntax/papy.vim [new file with mode: 0644]

index 4c41e3b48fadf839bb39f078bd830de19818868b..3ddacb4e44fe6e1762e4473e74b44c823c97ce00 100644 (file)
@@ -9,6 +9,7 @@
 
 require('options')
 require("autocmds")
+require('diagnostics')
 
 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
 if not (vim.uv or vim.loop).fs_stat(lazypath) then
index e1392aa2fc7482e49c4ae57b941d92c210fc9073..ac77c6f81b939c030c306a92a97fdb829d95402e 100644 (file)
@@ -5,3 +5,15 @@ vim.api.nvim_create_autocmd("TextYankPost", {
     vim.highlight.on_yank({ timeout = 200 })
   end,
 })
+
+vim.api.nvim_create_autocmd("BufEnter", {
+  pattern = "*.papy",
+  callback = function()
+    vim.bo.filetype = "papy"
+    vim.lsp.start({
+      name = 'papy-language-server',
+      cmd = { '/home/aloussase/Code/papyrus/build/papy-lsp-server' },
+      root_dir = vim.fn.getcwd(),
+    })
+  end,
+})
diff --git a/nvim/.config/nvim/lua/diagnostics.lua b/nvim/.config/nvim/lua/diagnostics.lua
new file mode 100644 (file)
index 0000000..8229891
--- /dev/null
@@ -0,0 +1,10 @@
+vim.diagnostic.config({
+  -- virtual_text = true,
+  virtual_lines = true,
+  underline = true,
+  signs = {
+    linehl = {
+      [vim.diagnostic.severity.ERROR] = 'ErrorMsg'
+    }
+  }
+})
diff --git a/nvim/.config/nvim/syntax/papy.vim b/nvim/.config/nvim/syntax/papy.vim
new file mode 100644 (file)
index 0000000..898010b
--- /dev/null
@@ -0,0 +1,2 @@
+syntax keyword @keyword begin end
+syntax region  @string  start=+"+  skip=+\\"+  end=+"+