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

View File

@ -1,25 +1,39 @@
local lsp = require('lsp-zero').preset({}) local lsp = require('lsp-zero').preset({})
lsp.on_attach(function(client, bufnr) lsp.on_attach(function(client, bufnr)
lsp.default_keymaps({buffer = bufnr}) lsp.default_keymaps({ buffer = bufnr })
end) end)
-- Language servers -- Language servers
lsp.ensure_installed({ if (MY_OS == 'Linux')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install -- Replace these with whatever servers you want to install
'bashls', 'bashls',
--'clangd', 'clangd',
'julials', 'julials',
--'lua_ls', 'lua_ls',
--'ltex', 'ltex',
'pylsp', 'pylsp',
--'texlab', 'texlab',
--'zls' --'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!!! START LANGUAGE SERVERS CONFIG HERE!!!
]]-- ]]
--
-- (Optional) Configure lua language server for neovim -- (Optional) Configure lua language server for neovim
@ -27,28 +41,45 @@ require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({}) require('lspconfig').clangd.setup({})
--require('lspconfig').gopls.setup({ --require('lspconfig').gopls.setup({})
-- on_attach = on_attach,
--})
require('lspconfig').julials.setup({ require('lspconfig').julials.setup({})
--on_attach = on_attach,
symbol_cache_download = true, require('lspconfig').lua_ls.setup({
--symbol_server = "https://symbol-server", settings = {
on_new_config = function(new_config, _) Lua = {
local julia = vim.fn.expand("/usr/local/share/julia/bin/julia") runtime = {
if require'lspconfig'.util.path.is_file(julia) then -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
vim.notify("Hello!") version = 'LuaJIT',
new_config.cmd[1] = julia },
end diagnostics = {
end -- 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 path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
local words = {} local words = {}
@ -85,6 +116,7 @@ require('lspconfig').zls.setup({})
--[[ --[[
END LANGUAGE SERVERS CONFIG HERE!!! END LANGUAGE SERVERS CONFIG HERE!!!
]]-- ]]
--
lsp.setup() lsp.setup()

View File

@ -1 +1,8 @@
require("eddie") 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 -- Colorscheme
use({ --use({
'rose-pine/neovim', -- 'rose-pine/neovim',
as = 'rose-pine', -- as = 'rose-pine',
config = function() -- config = function()
vim.cmd('colorscheme rose-pine') -- vim.cmd('colorscheme rose-pine')
end -- end
}) --})
use { "folke/tokyonight.nvim" }
-- Color Coloring -- Color Coloring
use({ 'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' } }) 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 -- Latex on NVIM
use 'lervag/vimtex' use 'lervag/vimtex'