Compare commits
12 Commits
ed63791365
...
d465dd1e91
Author | SHA1 | Date |
---|---|---|
Eduardo Cueto-Mendoza | d465dd1e91 | |
Eduardo Cueto-Mendoza | 61f874fcaf | |
Eduardo Cueto-Mendoza | d058cadf33 | |
Eduardo Cueto-Mendoza | cc8d398753 | |
Eduardo Cueto-Mendoza | 73b76d632b | |
Eduardo Cueto-Mendoza | 25194213c5 | |
Eduardo Cueto-Mendoza | a4e499e7fc | |
Eduardo Cueto-Mendoza | 1b0f39ac89 | |
Eduardo Cueto-Mendoza | f24eaebdf9 | |
Eduardo Cueto-Mendoza | 421d6f964c | |
Eduardo Cueto-Mendoza | 35c7a9d291 | |
Eduardo Cueto-Mendoza | 33652face2 |
|
@ -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 }
|
|
@ -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" })
|
||||
|
|
|
@ -1,25 +1,39 @@
|
|||
local lsp = require('lsp-zero').preset({})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
lsp.default_keymaps({ buffer = bufnr })
|
||||
end)
|
||||
|
||||
-- Language servers
|
||||
lsp.ensure_installed({
|
||||
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()
|
||||
|
|
7
init.lua
7
init.lua
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in New Issue