summaryrefslogtreecommitdiff
path: root/vim/.config/nvim/lsp
diff options
context:
space:
mode:
authorgyoder <70408179+gyoder@users.noreply.github.com>2025-06-14 11:41:23 +0200
committergyoder <70408179+gyoder@users.noreply.github.com>2025-06-14 11:41:23 +0200
commitbdf3cdecda3d112b14e3ceb50ce4f88862813270 (patch)
treeaec5cd7764ff726740426dd9e4897e8cdcbf97b6 /vim/.config/nvim/lsp
parentd6d6dab3806f88e27990936e83c7b74d08215a9d (diff)
added existing nvim config
Diffstat (limited to 'vim/.config/nvim/lsp')
-rw-r--r--vim/.config/nvim/lsp/ccls.lua26
-rw-r--r--vim/.config/nvim/lsp/clangd.lua28
-rw-r--r--vim/.config/nvim/lsp/luals.lua5
-rw-r--r--vim/.config/nvim/lsp/pyright.lua4
-rw-r--r--vim/.config/nvim/lsp/rust_analyzer.lua9
-rw-r--r--vim/.config/nvim/lsp/superhtml.lua22
-rw-r--r--vim/.config/nvim/lsp/tailwind-ls.lua62
-rw-r--r--vim/.config/nvim/lsp/zls.lua10
8 files changed, 166 insertions, 0 deletions
diff --git a/vim/.config/nvim/lsp/ccls.lua b/vim/.config/nvim/lsp/ccls.lua
new file mode 100644
index 0000000..f0a08c5
--- /dev/null
+++ b/vim/.config/nvim/lsp/ccls.lua
@@ -0,0 +1,26 @@
+return {
+ cmd = {
+ 'clangd',
+ -- '--clang-tidy',
+ -- '--background-index',
+ -- '--offset-encoding=utf-8',
+ },
+ filetypes = { 'arduino' },
+ root_markers = {
+ '.clangd',
+ '.ccls',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac' -- AutoTools
+ },
+ single_file_support = true,
+ capabilities = {
+ textDocument = {
+ completion = {
+ editsNearCursor = true,
+ },
+ },
+ offsetEncoding = { 'utf-8', 'utf-16' },
+ },
+}
+
diff --git a/vim/.config/nvim/lsp/clangd.lua b/vim/.config/nvim/lsp/clangd.lua
new file mode 100644
index 0000000..ddbab4f
--- /dev/null
+++ b/vim/.config/nvim/lsp/clangd.lua
@@ -0,0 +1,28 @@
+return {
+ cmd = {
+ 'clangd',
+ -- '--clang-tidy',
+ '--background-index',
+ '--offset-encoding=utf-8',
+ '--query-driver=/Users/scie/.platformio/packages/toolchain-xtensa-esp32/**'
+ },
+ filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto', 'arduino' },
+ root_markers = {
+ '.clangd',
+ '.clang-tidy',
+ '.clang-format',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac' -- AutoTools
+ },
+ single_file_support = true,
+ capabilities = {
+ textDocument = {
+ completion = {
+ editsNearCursor = true,
+ },
+ },
+ offsetEncoding = { 'utf-8', 'utf-16' },
+ },
+}
+
diff --git a/vim/.config/nvim/lsp/luals.lua b/vim/.config/nvim/lsp/luals.lua
new file mode 100644
index 0000000..745f38a
--- /dev/null
+++ b/vim/.config/nvim/lsp/luals.lua
@@ -0,0 +1,5 @@
+return {
+ cmd = {'lua-language-server'},
+ filetypes = {'lua'},
+ root_markers = {'.luarc.json', '.luarc.jsonc'},
+}
diff --git a/vim/.config/nvim/lsp/pyright.lua b/vim/.config/nvim/lsp/pyright.lua
new file mode 100644
index 0000000..178bfde
--- /dev/null
+++ b/vim/.config/nvim/lsp/pyright.lua
@@ -0,0 +1,4 @@
+return {
+ cmd = { "pyright-langserver", "--stdio" },
+ filetypes = { "python" }
+}
diff --git a/vim/.config/nvim/lsp/rust_analyzer.lua b/vim/.config/nvim/lsp/rust_analyzer.lua
new file mode 100644
index 0000000..6187a15
--- /dev/null
+++ b/vim/.config/nvim/lsp/rust_analyzer.lua
@@ -0,0 +1,9 @@
+return {
+ cmd = { 'rust-analyzer' },
+ filetypes = { 'rust', 'rs' },
+ root_markers = {
+ 'cargo.toml',
+ '.git'
+ },
+}
+
diff --git a/vim/.config/nvim/lsp/superhtml.lua b/vim/.config/nvim/lsp/superhtml.lua
new file mode 100644
index 0000000..7e68b25
--- /dev/null
+++ b/vim/.config/nvim/lsp/superhtml.lua
@@ -0,0 +1,22 @@
+---@brief
+---
+--- https://github.com/kristoff-it/superhtml
+---
+--- HTML Language Server & Templating Language Library
+---
+--- This LSP is designed to tightly adhere to the HTML spec as well as enforcing
+--- some additional rules that ensure HTML clarity.
+---
+--- If you want to disable HTML support for another HTML LSP, add the following
+--- to your configuration:
+---
+--- ```lua
+--- vim.lsp.config('superhtml', {
+--- filetypes = { 'superhtml' }
+--- })
+--- ```
+return {
+ cmd = { 'superhtml', 'lsp' },
+ filetypes = { 'superhtml', 'html', "htmldjango" },
+ root_markers = { '.git' },
+}
diff --git a/vim/.config/nvim/lsp/tailwind-ls.lua b/vim/.config/nvim/lsp/tailwind-ls.lua
new file mode 100644
index 0000000..9ab35a8
--- /dev/null
+++ b/vim/.config/nvim/lsp/tailwind-ls.lua
@@ -0,0 +1,62 @@
+return {
+ cmd = { 'tailwindcss-language-server', '--stdio' },
+ filetypes = {
+ -- html
+ 'aspnetcorerazor',
+ 'astro',
+ 'astro-markdown',
+ 'blade',
+ 'clojure',
+ 'django-html',
+ 'htmldjango',
+ 'edge',
+ 'eelixir', -- vim ft
+ 'elixir',
+ 'ejs',
+ 'erb',
+ 'eruby', -- vim ft
+ 'gohtml',
+ 'gohtmltmpl',
+ 'haml',
+ 'handlebars',
+ 'hbs',
+ 'html',
+ 'htmlangular',
+ 'html-eex',
+ 'heex',
+ 'jade',
+ 'leaf',
+ 'liquid',
+ 'markdown',
+ 'mdx',
+ 'mustache',
+ 'njk',
+ 'nunjucks',
+ 'php',
+ 'razor',
+ 'slim',
+ 'twig',
+ -- css
+ 'css',
+ 'less',
+ 'postcss',
+ 'sass',
+ 'scss',
+ 'stylus',
+ 'sugarss',
+ -- js
+ 'javascript',
+ 'javascriptreact',
+ 'reason',
+ 'rescript',
+ 'typescript',
+ 'typescriptreact',
+ -- mixed
+ 'vue',
+ 'svelte',
+ 'templ',
+ },
+ root_markers = {
+ 'tailwind.config.js'
+ },
+}
diff --git a/vim/.config/nvim/lsp/zls.lua b/vim/.config/nvim/lsp/zls.lua
new file mode 100644
index 0000000..332c059
--- /dev/null
+++ b/vim/.config/nvim/lsp/zls.lua
@@ -0,0 +1,10 @@
+return {
+ cmd = { 'zls' },
+ filetypes = { 'zig' },
+ root_markers = {
+ 'zls.json',
+ 'build.zig',
+ '.git'
+ },
+}
+