Compare commits

..

12 Commits

Author SHA1 Message Date
Eduardo Cueto-Mendoza d465dd1e91 Changed color theme 2023-08-28 12:51:22 +01:00
Eduardo Cueto-Mendoza 61f874fcaf Corrected a bug that didn't allow selection of OS 2023-08-10 13:46:53 +01:00
Eduardo Cueto-Mendoza d058cadf33 Configuring formatter for Lua 2023-08-07 12:59:29 +01:00
Eduardo Cueto-Mendoza cc8d398753 Global configuration, hopefully 2023-08-07 10:43:48 +01:00
Eduardo Cueto-Mendoza 73b76d632b Put global variable top, select which lsp install according to OS 2023-08-07 10:28:31 +01:00
Eduardo Cueto-Mendoza 25194213c5 Merge branch 'Linux'
Done to finally create a global configuration
2023-08-07 10:07:04 +01:00
Eduardo Cueto-Mendoza a4e499e7fc Additioin of global OS variable 2023-08-07 10:04:26 +01:00
Eduardo Cueto-Mendoza 1b0f39ac89 Modified LSP 2023-08-04 10:40:30 +01:00
Eduardo Cueto-Mendoza f24eaebdf9 Addition of autoformatting via LSP 2023-08-04 09:09:55 +01:00
Eduardo Cueto-Mendoza 421d6f964c Removed LSP configuration 2023-07-27 13:06:46 +01:00
Eduardo Cueto-Mendoza 35c7a9d291 Addition of dictionary files for LaTeX lsp 2023-07-26 09:46:02 +01:00
Eduardo Cueto-Mendoza 33652face2 Trying to set local leader to <Space> 2023-07-24 09:44:03 +01:00
5 changed files with 107 additions and 47 deletions

View File

@ -0,0 +1,16 @@
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 "rose-pine"
color = color or "tokyonight-night"
vim.cmd.colorscheme(color)
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })

View File

@ -5,21 +5,35 @@ 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
@ -27,28 +41,45 @@ require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
--require('lspconfig').gopls.setup({
-- on_attach = on_attach,
--})
--require('lspconfig').gopls.setup({})
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').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').lua_ls.setup(lsp.nvim_lua_ls())
require('lspconfig').texlab.setup({})
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
local words = {}
@ -85,6 +116,7 @@ require('lspconfig').zls.setup({})
--[[
END LANGUAGE SERVERS CONFIG HERE!!!
]]--
]]
--
lsp.setup()

View File

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