Complete refactor + moved to [lsp-zero](https://github.com/VonHeikemen/lsp-zero.nvim)

This commit is contained in:
Kristofers Solo
2023-08-09 02:01:47 +03:00
parent 9e449312d7
commit 5871bcd430
71 changed files with 2023 additions and 2204 deletions

View File

@@ -95,11 +95,11 @@ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
end,
})
-- Run PackerSync on file save
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
group = vim.api.nvim_create_augroup("AutoPackerSync", { clear = true }),
pattern = { "**/lua/plugins/*" },
callback = function()
require("lazy").sync()
end,
})
-- Run lazy on file save
-- vim.api.nvim_create_autocmd({ "BufWritePost" }, {
-- group = vim.api.nvim_create_augroup("AutoPackerSync", { clear = true }),
-- pattern = { "**/lua/plugins/*" },
-- callback = function()
-- require("lazy").sync()
-- end,
-- })

View File

@@ -1,17 +0,0 @@
-- Setup nvim-cmp.
local status_ok, npairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
npairs.setup({
check_ts = true, -- treesitter integration
disable_filetype = { "TelescopePrompt" },
})
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({}))

View File

@@ -1,9 +1,6 @@
require("solo.options")
require("solo.keymaps")
require("solo.vimwiki")
require("solo.plugin")
require("solo.autocommands")
require("solo.alpha")
require("solo.autopairs")
require("solo.autosave")
require("solo.mason")

View File

@@ -1,10 +1,10 @@
local keymap = vim.keymap.set
local bind = vim.keymap.set
local opts = { silent = true }
--Remap space as leader key
keymap("", "<Space>", "<Nop>", opts)
keymap("n", "q", "<Nop>", opts)
keymap("n", "Q", "<Nop>", opts)
bind("", "<Space>", "<Nop>", opts)
bind("n", "q", "<Nop>", opts)
bind("n", "Q", "<Nop>", opts)
vim.g.mapleader = " "
-- Modes
@@ -16,80 +16,80 @@ vim.g.mapleader = " "
-- command_mode = "c",
-- Normal --
keymap("n", "<C-d>", "<C-d>zz", opts)
keymap("n", "<C-u>", "<C-u>zz", opts)
keymap("n", "n", "nzzzv", opts)
keymap("n", "N", "Nzzzv", opts)
bind("n", "<C-d>", "<C-d>zz", opts)
bind("n", "<C-u>", "<C-u>zz", opts)
bind("n", "n", "nzzzv", opts)
bind("n", "N", "Nzzzv", opts)
-- Better window navigation with tmux
keymap("n", "<C-h>", "<cmd>TmuxNavigateLeft<cr>", opts)
keymap("n", "<C-j>", "<cmd>TmuxNavigateDown<cr>", opts)
keymap("n", "<C-k>", "<cmd>TmuxNavigateUp<cr>", opts)
keymap("n", "<C-l>", "<cmd>TmuxNavigateRight<cr>", opts)
bind("n", "<C-h>", "<cmd>TmuxNavigateLeft<cr>", opts)
bind("n", "<C-j>", "<cmd>TmuxNavigateDown<cr>", opts)
bind("n", "<C-k>", "<cmd>TmuxNavigateUp<cr>", opts)
bind("n", "<C-l>", "<cmd>TmuxNavigateRight<cr>", opts)
-- Resize with arrows
keymap("n", "<C-Up>", "<cmd>resize -2<cr>", opts)
keymap("n", "<C-Down>", "<cmd>resize +2<cr>", opts)
keymap("n", "<C-Left>", "<cmd>vertical resize -2<cr>", opts)
keymap("n", "<C-Right>", "<cmd>vertical resize +2<cr>", opts)
bind("n", "<C-Up>", "<cmd>resize -2<cr>", opts)
bind("n", "<C-Down>", "<cmd>resize +2<cr>", opts)
bind("n", "<C-Left>", "<cmd>vertical resize -2<cr>", opts)
bind("n", "<C-Right>", "<cmd>vertical resize +2<cr>", opts)
-- -- Navigate buffers
-- keymap("n", "<S-l>", "<cmd>bnext<cr>", opts)
-- keymap("n", "<S-h>", "<cmd>bprevious<cr>", opts)
-- bind("n", "<S-l>", "<cmd>bnext<cr>", opts)
-- bind("n", "<S-h>", "<cmd>bprevious<cr>", opts)
-- Better paste
keymap("v", "p", '"_dP', opts)
bind("v", "p", '"_dP', opts)
-- Move current line / block with Alt-j/k ala vscode
keymap("n", "<A-j>", "<cmd>m .+1<cr>==", opts)
keymap("n", "<A-k>", "<cmd>m .-2<cr>==", opts)
bind("n", "<A-j>", "<cmd>m .+1<cr>==", opts)
bind("n", "<A-k>", "<cmd>m .-2<cr>==", opts)
-- QuickFix
keymap("n", "]q", "<cmd>cnext<cr>", opts)
keymap("n", "[q", "<cmd>cprev<cr>", opts)
bind("n", "]q", "<cmd>cnext<cr>", opts)
bind("n", "[q", "<cmd>cprev<cr>", opts)
keymap("n", "<S-s>", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>", {})
bind("n", "<S-s>", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>", {})
keymap("n", "<S-j>", "mzJ`z")
bind("n", "<S-j>", "mzJ`z")
-- Insert --
-- Press jk fast to enter
keymap("i", "jk", "<ESC>", opts)
bind("i", "jk", "<ESC>", opts)
-- Move current line / block with Alt-j/k ala vscode.
keymap("i", "<A-j>", "<Esc><cmd>m .+1<cr>==gi", opts)
keymap("i", "<A-k>", "<Esc><cmd>m .-2<cr>==gi", opts)
bind("i", "<A-j>", "<Esc><cmd>m .+1<cr>==gi", opts)
bind("i", "<A-k>", "<Esc><cmd>m .-2<cr>==gi", opts)
-- navigation
keymap("i", "<A-Up>", "<C-\\><C-N><C-w>k", opts)
keymap("i", "<A-Down>", "<C-\\><C-N><C-w>j", opts)
keymap("i", "<A-Left>", "<C-\\><C-N><C-w>h", opts)
keymap("i", "<A-Right>", "<C-\\><C-N><C-w>l", opts)
bind("i", "<A-Up>", "<C-\\><C-N><C-w>k", opts)
bind("i", "<A-Down>", "<C-\\><C-N><C-w>j", opts)
bind("i", "<A-Left>", "<C-\\><C-N><C-w>h", opts)
bind("i", "<A-Right>", "<C-\\><C-N><C-w>l", opts)
-- Visual --
-- Stay in indent mode
keymap("v", "<", "<gv", opts)
keymap("v", ">", ">gv", opts)
bind("v", "<", "<gv", opts)
bind("v", ">", ">gv", opts)
-- keymap("v", "<A-j>", "<cmd>m '>+1<cr>gv=gv")
-- keymap("v", "<A-k>", "<cmd>m '<-2<cr>gv=gv")
-- bind("v", "<A-j>", "<cmd>m '>+1<cr>gv=gv")
-- bind("v", "<A-k>", "<cmd>m '<-2<cr>gv=gv")
-- Visual Block --
-- Move current line / block with Alt-j/k ala vscode.
-- keymap("x", "<A-j>", "<cmd>move '>+1<cr>gv-gv", opts)
-- keymap("x", "<A-k>", "<cmd>move '<-2<cr>gv-gv", opts)
-- bind("x", "<A-j>", "<cmd>move '>+1<cr>gv-gv", opts)
-- bind("x", "<A-k>", "<cmd>move '<-2<cr>gv-gv", opts)
-- Command --
-- navigate tab completion with <c-j> and <c-k>
-- runs conditionally
keymap("c", "<C-j>", 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true })
keymap("c", "<C-k>", 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true })
bind("c", "<C-j>", 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true })
bind("c", "<C-k>", 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true })
-- Terminal --
-- Terminal window navigation
keymap("t", "<C-h>", "<C-\\><C-N><C-w>h", opts)
keymap("t", "<C-j>", "<C-\\><C-N><C-w>j", opts)
keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", opts)
keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", opts)
bind("t", "<C-h>", "<C-\\><C-N><C-w>h", opts)
bind("t", "<C-j>", "<C-\\><C-N><C-w>j", opts)
bind("t", "<C-k>", "<C-\\><C-N><C-w>k", opts)
bind("t", "<C-l>", "<C-\\><C-N><C-w>l", opts)
keymap("n", "<C-b>", "<cmd>w!<cr><cmd>!compiler '%:p'<cr>")
keymap("n", "<C-o>", "<cmd>w!<cr><cmd>!opout '%:p'<cr>")
bind("n", "<C-b>", "<cmd>w!<cr><cmd>!compiler '%:p'<cr>")
bind("n", "<C-o>", "<cmd>w!<cr><cmd>!opout '%:p'<cr>")

View File

@@ -1,113 +0,0 @@
local M = {}
local status_cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
if not status_cmp_ok then
return
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem.snippetSupport = true
M.capabilities = cmp_nvim_lsp.default_capabilities(M.capabilities)
M.setup = function()
local signs = {
{ name = "DiagnosticSignError", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "" },
{ name = "DiagnosticSignInfo", text = "" },
}
for _, sign in pairs(signs) do
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
local config = {
virtual_text = false, -- virtual text
signs = {
active = signs, -- show signs
},
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = true,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
}
vim.diagnostic.config(config)
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = "rounded",
})
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = "rounded",
})
end
local function lsp_keymaps(bufnr)
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_buf_set_keymap
keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", opts)
keymap(bufnr, "n", "gd", "<cmd>lua require('telescope.builtin').lsp_definitions()<cr>", opts)
keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", opts)
keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<cr>", opts)
keymap(bufnr, "n", "gr", "<cmd>lua require('telescope.builtin').lsp_references()<cr>", opts)
keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<cr>", opts)
end
M.on_attach = function(client, bufnr)
lsp_keymaps(bufnr)
local status_ok, illuminate = pcall(require, "illuminate")
if not status_ok then
return
end
illuminate.configure({
-- providers: provider used to get references in the buffer, ordered by priority
providers = {
"lsp",
"treesitter",
"regex",
},
-- delay: delay in milliseconds
delay = 100,
-- filetype_overrides: filetype specific overrides.
-- The keys are strings to represent the filetype while the values are tables that
-- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist
filetype_overrides = {},
-- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
filetypes_denylist = {
"dirvish",
"fugitive",
"alpha",
"NvimTree",
},
-- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
filetypes_allowlist = {},
-- modes_denylist: modes to not illuminate, this overrides modes_allowlist
modes_denylist = {},
-- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
modes_allowlist = {},
-- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
-- Only applies to the 'regex' provider
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
providers_regex_syntax_denylist = {},
-- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
-- Only applies to the 'regex' provider
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
providers_regex_syntax_allowlist = {},
-- under_cursor: whether or not to illuminate under the cursor
under_cursor = true,
-- max_file_lines: max number of lines in a file to illuminate
max_file_lines = nil,
})
illuminate.on_attach(client)
end
return M

View File

@@ -1,8 +0,0 @@
local status_ok, _ = pcall(require, "mason-lspconfig")
if not status_ok then
return
end
require("solo.mason.mason-installer")
require("solo.mason.handlers").setup()
require("solo.mason.null-ls")

View File

@@ -1,85 +0,0 @@
local status_ok, mason = pcall(require, "mason")
if not status_ok then
return
end
local status_lspconfig_ok, lspconfig = pcall(require, "lspconfig")
if not status_lspconfig_ok then
return
end
local status_mason_lspconfig_ok, mason_lspconfig = pcall(require, "mason-lspconfig")
if not status_mason_lspconfig_ok then
return
end
local servers = {
"bashls",
"clangd",
"cmake",
"cssls",
"emmet_ls",
"html",
"jedi_language_server",
"jsonls",
"lua_ls",
"phpactor",
"ruff_lsp",
"rust_analyzer",
"sqlls",
"taplo",
"texlab",
"tsserver",
"tailwindcss",
}
mason.setup()
mason_lspconfig.setup({
ensure_installed = servers,
})
local on_attach = require("solo.mason.handlers").on_attach
local capabilities = require("solo.mason.handlers").capabilities
for _, server in pairs(servers) do
local opts = {
capabilities = capabilities,
on_attach = on_attach,
}
if server == "bashls" then
local bashls_opts = require("solo.mason.settings.bashls")
opts = vim.tbl_deep_extend("force", bashls_opts, opts)
end
if server == "lua_ls" then
local lua_ls_opts = require("solo.mason.settings.lua_ls")
opts = vim.tbl_deep_extend("force", lua_ls_opts, opts)
end
if server == "emmet_ls" then
local emmet_ls_opts = require("solo.mason.settings.emmet_ls")
opts = vim.tbl_deep_extend("force", emmet_ls_opts, opts)
end
if server == "rust_analyzer" then
local rust_analyzer_opts = require("solo.mason.settings.rust_analyzer")
opts = vim.tbl_deep_extend("force", rust_analyzer_opts, opts)
require("rust-tools").setup(opts)
goto continue
end
if server == "clangd" then
local clangd_opts = require("solo.mason.settings.clangd")
opts = vim.tbl_deep_extend("force", clangd_opts, opts)
require("clangd_extensions").setup(opts)
goto continue
end
if server == "texlab" then
local texlab_opts = require("solo.mason.settings.texlab")
opts = vim.tbl_deep_extend("force", texlab_opts, opts)
end
lspconfig[server].setup(opts)
::continue::
end

View File

@@ -1,60 +0,0 @@
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
if not null_ls_status_ok then
return
end
local mason_null_ls_status_ok, mason_null_ls = pcall(require, "mason-null-ls")
if not mason_null_ls_status_ok then
return
end
mason_null_ls.setup({
ensure_installed = {},
automatic_installation = true,
automatic_setup = true,
})
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
local formatting = null_ls.builtins.formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
local diagnostics = null_ls.builtins.diagnostics
-- https://github.com/prettier-solidity/prettier-plugin-solidity
null_ls.setup({
debug = false,
sources = {
diagnostics.cmake_lint,
diagnostics.codespell,
diagnostics.cpplint,
diagnostics.luacheck.with({ extra_args = { "--globals", "vim" } }),
diagnostics.misspell,
diagnostics.mypy,
formatting.beautysh,
formatting.black,
formatting.cbfmt.with({ extra_filetypes = { "vimwiki" } }),
formatting.clang_format,
formatting.cmake_format,
formatting.djlint,
formatting.google_java_format,
formatting.phpcbf,
formatting.prettier.with({
extra_filetypes = { "toml" },
extra_args = {
"--no-semi",
"--double-quote",
"--no-bracket-spacing",
"--tab-width",
"4",
"--bracket-same-line",
"--html-whitespace-sensitivity",
"strict",
},
}),
formatting.remark.with({ extra_filetypes = { "vimwiki" } }),
formatting.markdown_toc.with({ extra_filetypes = { "vimwiki" } }),
formatting.shellharden.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }),
formatting.shfmt.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }),
formatting.stylua,
formatting.usort,
formatting.yamlfmt,
},
})

View File

@@ -1,7 +0,0 @@
return {
filetypes = {
"sh",
"bash",
"zsh",
},
}

View File

@@ -1,71 +0,0 @@
return {
server = {
capabilities = {
offsetEncoding = { "utf-16" },
},
on_attach = require("solo.mason.handlers").on_attach,
},
extensions = {
-- defaults:
-- Automatically set inlay hints (type hints)
autoSetHints = true,
-- These apply to the default ClangdSetInlayHints command
inlay_hints = {
-- Only show inlay hints for the current line
only_current_line = false,
-- Event which triggers a refersh of the inlay hints.
-- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd = "CursorHold",
-- whether to show parameter hints with the inlay hints or not
show_parameter_hints = true,
-- prefix for parameter hints
parameter_hints_prefix = "<- ",
-- prefix for all the other hints (type, chaining)
other_hints_prefix = "=> ",
-- whether to align to the length of the longest line in the file
max_len_align = true,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7,
-- The color of the hints
highlight = "Comment",
-- The highlight group priority for extmark
priority = 100,
},
ast = {
-- These require codicons (https://github.com/microsoft/vscode-codicons)
role_icons = {
type = "",
declaration = "",
expression = "",
specifier = "",
statement = "",
["template argument"] = "",
},
kind_icons = {
Compound = "",
Recovery = "",
TranslationUnit = "",
PackExpansion = "",
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
},
highlights = {
detail = "Comment",
},
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
},
},
}

View File

@@ -1,13 +0,0 @@
return {
filetypes = {
"html",
"htmldjango",
"typescriptreact",
"javascriptreact",
"css",
"sass",
"scss",
"less",
"eruby",
},
}

View File

@@ -1,35 +0,0 @@
return {
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", "awesome", "client" },
},
-- 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,
},
root_pattern = {
".stylua.toml",
".luarc.json",
".luarc.jsonc",
".luacheckrc",
"stylua.toml",
"selene.toml",
"selene.yml",
".git",
},
format = {
enable = false,
},
},
},
}

View File

@@ -1,105 +0,0 @@
return {
server = {
on_attach = require("solo.mason.handlers").on_attach,
capabilities = require("solo.mason.handlers").capabilities,
},
tools = {
-- how to execute terminal commands
-- options right now: termopen / quickfix
executor = require("rust-tools.executors").termopen,
-- callback to execute once rust-analyzer is done initializing the workspace
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
on_initialized = function()
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("InitializeRustAnalyzer", { clear = true }),
pattern = { "*.rs" },
callback = function()
vim.lsp.codelens.refresh()
end,
})
end,
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
reload_workspace_from_cargo_toml = true,
-- These apply to the default RustSetInlayHints command
inlay_hints = {
-- automatically set inlay hints (type hints)
-- default: true
auto = true,
-- Only show inlay hints for the current line
only_current_line = false,
-- whether to show parameter hints with the inlay hints or not
-- default: true
show_parameter_hints = true,
-- prefix for parameter hints
-- default: "<-"
parameter_hints_prefix = " <- ",
-- prefix for all the other hints (type, chaining)
-- default: "=>"
other_hints_prefix = " => ",
-- whether to align to the length of the longest line in the file
max_len_align = false,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7,
-- The color of the hints
highlight = "Comment",
},
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
hover_actions = {
-- the border that is used for the hover window
-- see vim.api.nvim_open_win()
border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
},
-- Maximal width of the hover window. Nil means no max.
max_width = nil,
-- Maximal height of the hover window. Nil means no max.
max_height = nil,
-- whether the hover action window gets automatically focused
-- default: false
auto_focus = false,
},
-- settings for showing the crate graph based on graphviz and the dot
-- command
crate_graph = {
-- Backend used for displaying the graph
-- see: https://graphviz.org/docs/outputs/
-- default: x11
backend = "x11",
-- where to store the output, nil for no output stored (relative
-- path from pwd)
-- default: nil
output = nil,
-- true for all crates.io and external crates, false only the local
-- crates
-- default: true
full = true,
},
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
server = {
-- standalone file support
-- setting it to false may improve startup time
standalone = true,
}, -- rust-analyzer options
-- debugging stuff
dap = {
adapter = {
type = "executable",
command = "codelldb",
name = "rt_lldb",
},
},
},
}

View File

@@ -1,27 +0,0 @@
return {
settings = {
texlab = {
auxDirectory = ".",
bibtexFormatter = "texlab",
build = {
args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" },
executable = "xelatex",
forwardSearchAfter = false,
onSave = false,
},
chktex = {
onEdit = false,
onOpenAndSave = false,
},
diagnosticsDelay = 0,
formatterLineLength = 120,
forwardSearch = {
args = {},
},
latexFormatter = "latexindent",
latexindent = {
modifyLineBreaks = false,
},
},
},
}

View File

@@ -40,6 +40,7 @@ local options = {
guifont = "JetBrainsMono NF:h11", -- the font used in graphical neovim applications
spell = false,
foldmethod = "manual",
breakindent = true, -- Enable break indent
}
vim.opt.fillchars.eob = " "
@@ -61,3 +62,17 @@ g.loaded_netrwPlugin = 1
vim.opt_local.suffixesadd:prepend(".lua")
vim.opt_local.suffixesadd:prepend("init.lua")
vim.opt_local.path:prepend(vim.fn.stdpath("config") .. "/lua")
vim.g.vimwiki_list = {
{
path = "~/vimwiki",
syntax = "markdown",
ext = ".md",
},
}
vim.g.vimwiki_ext2syntax = {
[".md"] = "markdown",
[".markdown"] = "markdown",
[".mdown"] = "markdown",
}
vim.g.vimwiki_global_ext = 1

View File

@@ -1,14 +0,0 @@
vim.g.vimwiki_list = {
{
path = "~/vimwiki",
syntax = "markdown",
ext = ".md",
},
}
vim.g.vimwiki_ext2syntax = {
[".md"] = "markdown",
[".markdown"] = "markdown",
[".mdown"] = "markdown",
}
vim.g.vimwiki_global_ext = 1