Update readme

This commit is contained in:
2025-09-01 17:07:32 +02:00
parent c351f5edd4
commit e2a6c21f81
3 changed files with 22 additions and 12 deletions

View File

@@ -1,11 +1,11 @@
# Neovim configuration in pure lua # Neovim configuration in pure lua
You can configure the current semester that you are in for university integrations. Configure the environment in `conf.lua`.
There are certain things required like `make` and `npm` for various plugins. Most lsp require `npm` installed on the system.
## Dependencies ## Dependencies
To install proper snippets and get the basic lsp the following programs are needed in path. To install proper snippets and get lsp running install the following programs into your path
``` ```
make make
@@ -14,8 +14,3 @@ gcc
libc libc
bash bash
``` ```
## General
This configuration is based on the lazy plugin manager.

View File

@@ -58,7 +58,8 @@ return {
config = function() config = function()
require("mason").setup() require("mason").setup()
-- Workaround for local zls -- Workaround for local lsp only
-- does not work so nice on non nixos systems
local servers_modified = servers local servers_modified = servers
for i, v in ipairs(servers_modified) do for i, v in ipairs(servers_modified) do
if v == "zls" then if v == "zls" then
@@ -69,6 +70,10 @@ return {
table.remove(servers_modified, i) table.remove(servers_modified, i)
break break
end end
if v == "hls" then
table.remove(servers_modified, i)
break
end
end end
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({

View File

@@ -51,6 +51,18 @@ function M.get_lsp_servers()
warn_once("gopls", "[mason] Skipping gopls (go not found)") warn_once("gopls", "[mason] Skipping gopls (go not found)")
end end
if vim.fn.executable("php") == 1 then
table.insert(servers, "intelephense")
else
warn_once("php", "[mason] Skipping intelephense (php not found)")
end
if vim.fn.executable("hls") == 1 then
table.insert(servers, "hls")
else
warn_once("haskell", "[mason] Skipping hls (hls not found)")
end
if vim.fn.executable("npm") == 1 then if vim.fn.executable("npm") == 1 then
if vim.fn.executable("clangd") == 1 then if vim.fn.executable("clangd") == 1 then
table.insert(servers, "clangd") table.insert(servers, "clangd")
@@ -61,7 +73,7 @@ function M.get_lsp_servers()
table.insert(servers, "html") table.insert(servers, "html")
table.insert(servers, "jsonls") table.insert(servers, "jsonls")
else else
warn_once("npm", "[mason] Skipping pyright/clangd/bashls (npm not found)") warn_once("npm", "[mason] Skipping npm related (npm not found)")
end end
if vim.fn.executable("cargo") == 1 then if vim.fn.executable("cargo") == 1 then
@@ -76,13 +88,11 @@ function M.get_lsp_servers()
end end
if vim.fn.executable("deno") == 1 then if vim.fn.executable("deno") == 1 then
--table.insert(servers, "denols")
table.insert(servers, "ts_ls") table.insert(servers, "ts_ls")
else else
warn_once("deno", "[mason] Skipping denols and tsserver (deno not found)") warn_once("deno", "[mason] Skipping denols and tsserver (deno not found)")
end end
-- Only configure zig when in local environment
if vim.fn.executable("zls") == 1 then if vim.fn.executable("zls") == 1 then
table.insert(servers, "zls") table.insert(servers, "zls")
end end