mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
Update readme
This commit is contained in:
11
README.md
11
README.md
@@ -1,11 +1,11 @@
|
||||
# Neovim configuration in pure lua
|
||||
|
||||
You can configure the current semester that you are in for university integrations.
|
||||
There are certain things required like `make` and `npm` for various plugins.
|
||||
Configure the environment in `conf.lua`.
|
||||
Most lsp require `npm` installed on the system.
|
||||
|
||||
## 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
|
||||
@@ -14,8 +14,3 @@ gcc
|
||||
libc
|
||||
bash
|
||||
```
|
||||
|
||||
## General
|
||||
|
||||
This configuration is based on the lazy plugin manager.
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ return {
|
||||
config = function()
|
||||
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
|
||||
for i, v in ipairs(servers_modified) do
|
||||
if v == "zls" then
|
||||
@@ -69,6 +70,10 @@ return {
|
||||
table.remove(servers_modified, i)
|
||||
break
|
||||
end
|
||||
if v == "hls" then
|
||||
table.remove(servers_modified, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
|
||||
@@ -51,6 +51,18 @@ function M.get_lsp_servers()
|
||||
warn_once("gopls", "[mason] Skipping gopls (go not found)")
|
||||
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("clangd") == 1 then
|
||||
table.insert(servers, "clangd")
|
||||
@@ -61,7 +73,7 @@ function M.get_lsp_servers()
|
||||
table.insert(servers, "html")
|
||||
table.insert(servers, "jsonls")
|
||||
else
|
||||
warn_once("npm", "[mason] Skipping pyright/clangd/bashls (npm not found)")
|
||||
warn_once("npm", "[mason] Skipping npm related (npm not found)")
|
||||
end
|
||||
|
||||
if vim.fn.executable("cargo") == 1 then
|
||||
@@ -76,13 +88,11 @@ function M.get_lsp_servers()
|
||||
end
|
||||
|
||||
if vim.fn.executable("deno") == 1 then
|
||||
--table.insert(servers, "denols")
|
||||
table.insert(servers, "ts_ls")
|
||||
else
|
||||
warn_once("deno", "[mason] Skipping denols and tsserver (deno not found)")
|
||||
end
|
||||
|
||||
-- Only configure zig when in local environment
|
||||
if vim.fn.executable("zls") == 1 then
|
||||
table.insert(servers, "zls")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user