Compare commits

..

No commits in common. "d465dd1e91496fe44344fc779c06c9aee7e739b9" and "ed63791365a13163ef57104f5922881b1250b1f6" have entirely different histories.

5 changed files with 47 additions and 107 deletions

View File

@ -1,16 +0,0 @@
require("lsp-format").setup {}
local on_attach = function(client)
require("lsp-format").on_attach(client)
-- ... custom code ...
end
require("lspconfig").bashls.setup { on_attach = on_attach }
require("lspconfig").clangd.setup { on_attach = on_attach }
require("lspconfig").julials.setup { on_attach = on_attach }
require("lspconfig").lua_ls.setup { on_attach = on_attach }
require("lspconfig").ltex.setup { on_attach = on_attach }
require("lspconfig").pylsp.setup { on_attach = on_attach }
require("lspconfig").texlab.setup { on_attach = on_attach }
require("lspconfig").zls.setup { on_attach = on_attach }

View File

@ -1,6 +1,6 @@
function ColorMyPencils(color)
color = color or "tokyonight-night"
color = color or "rose-pine"
vim.cmd.colorscheme(color)
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })

View File

@ -5,35 +5,21 @@ lsp.on_attach(function(client, bufnr)
end)
-- Language servers
if (MY_OS == 'Linux')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'clangd',
--'clangd',
'julials',
'lua_ls',
'ltex',
--'lua_ls',
--'ltex',
'pylsp',
'texlab',
--'texlab',
--'zls'
})
elseif (MY_OS == 'FreeBSD')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'julials',
'pylsp',
})
else
print('Should never be here')
end
--[[
START LANGUAGE SERVERS CONFIG HERE!!!
]]
--
]]--
-- (Optional) Configure lua language server for neovim
@ -41,45 +27,28 @@ require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
--require('lspconfig').gopls.setup({})
--require('lspconfig').gopls.setup({
-- on_attach = on_attach,
--})
require('lspconfig').julials.setup({})
require('lspconfig').lua_ls.setup({
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { 'vim' },
neededFileStatus = {
["codestyle-check"] = "Any",
},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
format = {
enable = true,
-- Put format options here
-- NOTE: the value should be STRING!!
defaultConfig = {
indent_style = "space",
indent_size = "4",
}
},
},
},
require('lspconfig').julials.setup({
--on_attach = on_attach,
symbol_cache_download = true,
--symbol_server = "https://symbol-server",
on_new_config = function(new_config, _)
local julia = vim.fn.expand("/usr/local/share/julia/bin/julia")
if require'lspconfig'.util.path.is_file(julia) then
vim.notify("Hello!")
new_config.cmd[1] = julia
end
end
})
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
require('lspconfig').texlab.setup({})
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
local words = {}
@ -116,7 +85,6 @@ require('lspconfig').zls.setup({})
--[[
END LANGUAGE SERVERS CONFIG HERE!!!
]]
--
]]--
lsp.setup()

View File

@ -1,8 +1 @@
require("eddie")
local f = io.popen("uname -s")
if (f ~= nil) then
MY_OS = f:read("*a")
MY_OS = string.gsub(MY_OS, "%s+", "")
f:close()
end

View File

@ -15,15 +15,13 @@ return require('packer').startup(function(use)
}
-- Colorscheme
--use({
-- 'rose-pine/neovim',
-- as = 'rose-pine',
-- config = function()
-- vim.cmd('colorscheme rose-pine')
-- end
--})
use { "folke/tokyonight.nvim" }
use({
'rose-pine/neovim',
as = 'rose-pine',
config = function()
vim.cmd('colorscheme rose-pine')
end
})
-- Color Coloring
use({ 'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' } })
@ -61,9 +59,6 @@ return require('packer').startup(function(use)
}
}
-- Code formatting
use "lukas-reineke/lsp-format.nvim"
-- Latex on NVIM
use 'lervag/vimtex'