nix-dotfiles/programs/neovim/init.lua

103 lines
2.3 KiB
Lua

-- Options
--- ui
vim.opt.number = true
vim.opt.syntax = 'on'
vim.opt.smartcase = true
vim.opt.statusline = "%F %{wordcount().words} words"
vim.opt.wrap = false -- don't wrap text
--- clipboard
vim.opt.clipboard = 'unnamedplus'
-- Enable lazy.vim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct
plugins = {
"folke/which-key.nvim",
{ "folke/neoconf.nvim", cmd = "Neoconf" },
"folke/neodev.nvim",
{
"neovim/nvim-lspconfig",
["dependencies"] = { -- Dependencies define which plugins are loaded before this one
{ "j-hui/fidget.nvim", ["opts"] = {} },
{ "folke/neodev.nvim", ["opts"] = {} }
},
["name"] = "nvim-lspconfig"
},
{
"nvim-treesitter/nvim-treesitter",
["config"] = function(_, _)
require("nvim-treesitter.configs").setup({
["auto-install"] = true,
["highlight"] = {
["enable"] = true,
},
["incremental-selection"] = {
["enable"] = true,
},
})
end
},
{
"ms-jpq/coq_nvim",
["dependencies"] = {
"nvim-lspconfig",
{ "ms-jpq/coq.artifacts" },
{ "ms-jpq/coq.thirdparty" },
},
["config"] = function(_, _)
-- vim.g.coq_settings = {
-- ["xdg"] = true
-- }
-- coq.Now("--shut-up")
end
},
{
'AlexvZyl/nordic.nvim',
lazy = false,
priority = 1000,
config = function()
require 'nordic' .load()
end
},
"lervag/vimtex",
-- {
-- 'nvim-lualine/lualine.nvim',
-- dependencies = { 'nvim-tree/nvim-web-devicons' }
-- },
}
require("lazy").setup(plugins)
-- Configure nvim-lspconfig to work with servers; configure coq to work with lsps
-- TODO put this in coq config block in lazy so it doesn't load every time!!!!!!!
local lspconfig = require('lspconfig')
local coq = require('coq')
lspconfig.ocamllsp.setup(coq.lsp_ensure_capabilities({}))
-- Configure vimtex
vim.g.vimtex_view_method = "zathura"
-- Configure lualine
-- require('lualine').setup {
-- options = {
-- icons_enabled = true,
-- theme = 'nord',
-- },
-- }