Format using stylua
This commit is contained in:
parent
c77ca34e12
commit
55bcf81f4b
|
@ -1 +1 @@
|
|||
vim.bo.commentstring = '#%s'
|
||||
vim.bo.commentstring = "#%s"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
-- Personal neovim init file
|
||||
-- Daniele Tricoli <eriol@mornie.org>
|
||||
|
||||
require('settings')
|
||||
require "settings"
|
||||
|
||||
-- Load plugins.
|
||||
require('plugins.packer')
|
||||
require "plugins.packer"
|
||||
|
||||
require('keymaps')
|
||||
require "keymaps"
|
||||
|
||||
require('colorscheme')
|
||||
require "colorscheme"
|
||||
|
|
|
@ -1 +1 @@
|
|||
pcall(vim.cmd, 'colorscheme kanagawa')
|
||||
pcall(vim.cmd, "colorscheme kanagawa")
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
require('material').setup {
|
||||
borders = true,
|
||||
italics = {
|
||||
comments = true,
|
||||
},
|
||||
text_contrast = {
|
||||
darker = true
|
||||
}
|
||||
}
|
||||
require("material").setup({
|
||||
borders = true,
|
||||
italics = {
|
||||
comments = true,
|
||||
},
|
||||
text_contrast = {
|
||||
darker = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.g.material_style = 'darker'
|
||||
vim.g.material_style = "darker"
|
||||
-- On lualine set theme = 'material-nvim'
|
||||
|
||||
pcall(vim.cmd, 'colorscheme material')
|
||||
pcall(vim.cmd, "colorscheme material")
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
-- vim.g.moonflyCursorColor = 1
|
||||
vim.g.moonflyNormalFloat = 1
|
||||
|
||||
pcall(vim.cmd, 'colorscheme moonfly')
|
||||
pcall(vim.cmd, "colorscheme moonfly")
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
vim.g.neon_style = 'dark'
|
||||
vim.g.neon_style = "dark"
|
||||
|
||||
pcall(vim.cmd, 'colorscheme neon')
|
||||
pcall(vim.cmd, "colorscheme neon")
|
||||
|
|
|
@ -1 +1 @@
|
|||
require('onedark').setup()
|
||||
require("onedark").setup()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
vim.g.tokyonight_style = 'night'
|
||||
vim.g.tokyonight_style = "night"
|
||||
|
||||
pcall(vim.cmd, 'colorscheme tokyonight')
|
||||
pcall(vim.cmd, "colorscheme tokyonight")
|
||||
|
|
|
@ -1 +1 @@
|
|||
require('colors.kanagawa')
|
||||
require "colors.kanagawa"
|
||||
|
|
|
@ -2,21 +2,21 @@ local map = vim.api.nvim_set_keymap
|
|||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- CTRL+l to clear search highlighting.
|
||||
map('n', '<C-l>', ':nohlsearch<cr><C-l>', opts)
|
||||
map("n", "<C-l>", ":nohlsearch<cr><C-l>", opts)
|
||||
|
||||
-- Move into splits after creation.
|
||||
map('n', '<C-w>v', '<C-w>v<C-w>w', opts)
|
||||
map('n', '<C-w>s', '<C-w>s<C-w>w', opts)
|
||||
map("n", "<C-w>v", "<C-w>v<C-w>w", opts)
|
||||
map("n", "<C-w>s", "<C-w>s<C-w>w", opts)
|
||||
|
||||
-- Save with <leader> and s.
|
||||
map('n', '<leader>s', ':w<cr>', opts)
|
||||
map("n", "<leader>s", ":w<cr>", opts)
|
||||
|
||||
-- Close all and exit.
|
||||
map('n', '<leader>q', ':qa!<cr>', opts)
|
||||
map("n", "<leader>q", ":qa!<cr>", opts)
|
||||
|
||||
-- Fix broken Page Up/Down.
|
||||
-- https://vimrc-dissection.blogspot.com/2009/02/fixing-pageup-and-pagedown.html
|
||||
map('n', '<PageUp>', '1000<C-u>', opts)
|
||||
map('n', '<PageDown>', '1000<C-d>', opts)
|
||||
map('i', '<PageUp>', '<C-o>1000<C-u>', opts)
|
||||
map('i', '<PageDown>', '<C-o>1000<C-d>', opts)
|
||||
map("n", "<PageUp>", "1000<C-u>", opts)
|
||||
map("n", "<PageDown>", "1000<C-d>", opts)
|
||||
map("i", "<PageUp>", "<C-o>1000<C-u>", opts)
|
||||
map("i", "<PageDown>", "<C-o>1000<C-d>", opts)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require('Comment').setup()
|
||||
require("Comment").setup()
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<C-_>", "gcc", {})
|
||||
vim.api.nvim_set_keymap("v", "<C-_>", "gc", {})
|
||||
|
|
|
@ -1 +1 @@
|
|||
require('gitsigns').setup()
|
||||
require("gitsigns").setup()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
require('indent_blankline').setup {
|
||||
buftype_exclude = { 'terminal' },
|
||||
filetype_exclude = {
|
||||
'help',
|
||||
'packer',
|
||||
'startify'
|
||||
},
|
||||
show_first_indent_level = false,
|
||||
show_end_of_line = true
|
||||
}
|
||||
require("indent_blankline").setup({
|
||||
buftype_exclude = { "terminal" },
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"packer",
|
||||
"startify",
|
||||
},
|
||||
show_first_indent_level = false,
|
||||
show_end_of_line = true,
|
||||
})
|
||||
|
|
|
@ -1,90 +1,98 @@
|
|||
-- Configuration for null-ls, nvim-lspconfig and lsp-status.
|
||||
|
||||
-- Redefine sign.
|
||||
local signs = { Error = ' ', Warn = ' ', Hint = ' ', Info = ' ' }
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = 'DiagnosticSign' .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
|
||||
local null_ls = require("null-ls")
|
||||
local lspconfig = require("lspconfig")
|
||||
local lsp_status = require('lsp-status')
|
||||
require('lsp_signature').setup()
|
||||
local null_ls = require "null-ls"
|
||||
local lspconfig = require "lspconfig"
|
||||
local lsp_status = require "lsp-status"
|
||||
require("lsp_signature").setup()
|
||||
|
||||
lsp_status.register_progress()
|
||||
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local opts = { noremap=true, silent=true }
|
||||
local function buf_set_keymap(...)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||
end
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Enable floating window borders
|
||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = 'single'
|
||||
}
|
||||
)
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||
vim.lsp.handlers.signatureHelp, {
|
||||
border = 'single'
|
||||
}
|
||||
)
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = "single",
|
||||
})
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signatureHelp, {
|
||||
border = "single",
|
||||
})
|
||||
|
||||
local common_on_attach = function(client, bufnr)
|
||||
-- Mappings.
|
||||
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next({severity_limit = "Warn", popup_opts = {border = "single"}})<cr>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev({severity_limit = "Warn", popup_opts = {border = "single"}})<cr>', opts)
|
||||
-- Mappings.
|
||||
buf_set_keymap("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", opts)
|
||||
buf_set_keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", opts)
|
||||
buf_set_keymap("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", opts)
|
||||
buf_set_keymap(
|
||||
"n",
|
||||
"]d",
|
||||
'<cmd>lua vim.diagnostic.goto_next({severity_limit = "Warn", popup_opts = {border = "single"}})<cr>',
|
||||
opts
|
||||
)
|
||||
buf_set_keymap(
|
||||
"n",
|
||||
"[d",
|
||||
'<cmd>lua vim.diagnostic.goto_prev({severity_limit = "Warn", popup_opts = {border = "single"}})<cr>',
|
||||
opts
|
||||
)
|
||||
|
||||
lsp_status.on_attach(client)
|
||||
lsp_status.on_attach(client)
|
||||
end
|
||||
|
||||
null_ls.setup({
|
||||
debug = false,
|
||||
sources = {
|
||||
-- Python
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.diagnostics.flake8,
|
||||
-- Go
|
||||
null_ls.builtins.formatting.gofmt,
|
||||
null_ls.builtins.formatting.goimports,
|
||||
-- Rust
|
||||
null_ls.builtins.formatting.rustfmt,
|
||||
-- Yaml
|
||||
null_ls.builtins.diagnostics.yamllint,
|
||||
-- HTML and others
|
||||
null_ls.builtins.formatting.prettier,
|
||||
-- Lua
|
||||
null_ls.builtins.formatting.stylua,
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
-- Format on save.
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
buf_set_keymap('n', '<A-f>', '<cmd>lua vim.lsp.buf.formatting_seq_sync()<cr>', opts)
|
||||
vim.cmd 'autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()'
|
||||
end
|
||||
end
|
||||
debug = false,
|
||||
sources = {
|
||||
-- Python
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.diagnostics.flake8,
|
||||
-- Go
|
||||
null_ls.builtins.formatting.gofmt,
|
||||
null_ls.builtins.formatting.goimports,
|
||||
-- Rust
|
||||
null_ls.builtins.formatting.rustfmt,
|
||||
-- Yaml
|
||||
null_ls.builtins.diagnostics.yamllint,
|
||||
-- HTML and others
|
||||
null_ls.builtins.formatting.prettier,
|
||||
-- Lua
|
||||
null_ls.builtins.formatting.stylua,
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
-- Format on save.
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
buf_set_keymap("n", "<A-f>", "<cmd>lua vim.lsp.buf.formatting_seq_sync()<cr>", opts)
|
||||
vim.cmd "autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()"
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Use a loop to call `setup` on multiple servers.
|
||||
local servers = {
|
||||
'ansiblels',
|
||||
'esbonio',
|
||||
'gopls',
|
||||
'pyright',
|
||||
'rust_analyzer',
|
||||
'texlab',
|
||||
"ansiblels",
|
||||
"esbonio",
|
||||
"gopls",
|
||||
"pyright",
|
||||
"rust_analyzer",
|
||||
"texlab",
|
||||
}
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
capabilities = lsp_status.capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
},
|
||||
on_attach = common_on_attach,
|
||||
}
|
||||
lspconfig[lsp].setup({
|
||||
capabilities = lsp_status.capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
},
|
||||
on_attach = common_on_attach,
|
||||
})
|
||||
end
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = { 'startify' },
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{ 'mode', fmt = function(str) return str:sub(1,1) end },
|
||||
},
|
||||
},
|
||||
}
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = { "startify" },
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
"mode",
|
||||
fmt = function(str)
|
||||
return str:sub(1, 1)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
local ls = require('luasnip')
|
||||
local ls = require "luasnip"
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
function date_rfc3339()
|
||||
local cmd = assert(io.popen('/usr/bin/date --rfc-3339=seconds'))
|
||||
local output = cmd:read('*all')
|
||||
cmd:close()
|
||||
return output:gsub("\n", "")
|
||||
local cmd = assert(io.popen "/usr/bin/date --rfc-3339=seconds")
|
||||
local output = cmd:read "*all"
|
||||
cmd:close()
|
||||
return output:gsub("\n", "")
|
||||
end
|
||||
|
||||
ls.snippets = {
|
||||
markdown = {
|
||||
s(
|
||||
{trig="zolan", dscr="Create a new zola entry"},
|
||||
{
|
||||
t({'+++', 'draft = true'}),
|
||||
t({'', 'date = '}), t(date_rfc3339()),
|
||||
t({'', 'title = "'}), i(1), t('"'),
|
||||
t({'', '[taxonomies]'}),
|
||||
t({'', 'tags = ["'}), i(2), t('"]'),
|
||||
t({'', '+++', ''}),
|
||||
i(0),
|
||||
}
|
||||
),
|
||||
},
|
||||
markdown = {
|
||||
s({ trig = "zolan", dscr = "Create a new zola entry" }, {
|
||||
t({ "+++", "draft = true" }),
|
||||
t({ "", "date = " }),
|
||||
t(date_rfc3339()),
|
||||
t({ "", 'title = "' }),
|
||||
i(1),
|
||||
t '"',
|
||||
t({ "", "[taxonomies]" }),
|
||||
t({ "", 'tags = ["' }),
|
||||
i(2),
|
||||
t '"]',
|
||||
t({ "", "+++", "" }),
|
||||
i(0),
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require('nvim-autopairs').setup {}
|
||||
require("nvim-autopairs").setup({})
|
||||
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
||||
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||
local cmp = require "cmp"
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
||||
|
|
|
@ -1,59 +1,62 @@
|
|||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
local cmp = require "cmp"
|
||||
local luasnip = require "luasnip"
|
||||
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
keyword_length = 2
|
||||
},
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
keyword_length = 2,
|
||||
},
|
||||
|
||||
mapping = {
|
||||
['<cr>'] = cmp.mapping.confirm(),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
mapping = {
|
||||
["<cr>"] = cmp.mapping.confirm(),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lua' },
|
||||
{ name = "luasnip" },
|
||||
{ name = 'buffer',
|
||||
option = {
|
||||
keyword_pattern = [[\k\+]],
|
||||
-- Use all buffers to complete.
|
||||
get_bufnrs = function() return vim.api.nvim_list_bufs() end
|
||||
},
|
||||
},
|
||||
{ name = 'path' },
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "luasnip" },
|
||||
{
|
||||
name = "buffer",
|
||||
option = {
|
||||
keyword_pattern = [[\k\+]],
|
||||
-- Use all buffers to complete.
|
||||
get_bufnrs = function()
|
||||
return vim.api.nvim_list_bufs()
|
||||
end,
|
||||
},
|
||||
},
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
require('nvim-tree').setup{
|
||||
auto_close = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
},
|
||||
view = {
|
||||
width = 35
|
||||
}
|
||||
}
|
||||
require("nvim-tree").setup({
|
||||
auto_close = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
},
|
||||
view = {
|
||||
width = 35,
|
||||
},
|
||||
})
|
||||
|
||||
vim.g.nvim_tree_quit_on_open = 1
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<C-n>", "<cmd>NvimTreeToggle<cr>", {})
|
||||
|
||||
vim.cmd("autocmd BufWinEnter NvimTree setlocal cursorline")
|
||||
vim.cmd "autocmd BufWinEnter NvimTree setlocal cursorline"
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
-- For orgmode.
|
||||
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
parser_config.org = {
|
||||
install_info = {
|
||||
url = 'https://github.com/milisims/tree-sitter-org',
|
||||
revision = 'main',
|
||||
files = {'src/parser.c', 'src/scanner.cc'},
|
||||
},
|
||||
filetype = 'org',
|
||||
install_info = {
|
||||
url = "https://github.com/milisims/tree-sitter-org",
|
||||
revision = "main",
|
||||
files = { "src/parser.c", "src/scanner.cc" },
|
||||
},
|
||||
filetype = "org",
|
||||
}
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {'org'},
|
||||
additional_vim_regex_highlighting = {'org'},
|
||||
},
|
||||
ensure_installed = {'org'},
|
||||
}
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "org" },
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
ensure_installed = { "org" },
|
||||
})
|
||||
|
|
|
@ -1,127 +1,130 @@
|
|||
-- Plugins configuration.
|
||||
|
||||
local ft_programming = {
|
||||
'bash',
|
||||
'c',
|
||||
'cmake',
|
||||
'cpp',
|
||||
'html',
|
||||
'markdown',
|
||||
'python',
|
||||
'sh',
|
||||
'tex',
|
||||
'vim',
|
||||
'zsh'
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"html",
|
||||
"markdown",
|
||||
"python",
|
||||
"sh",
|
||||
"tex",
|
||||
"vim",
|
||||
"zsh",
|
||||
}
|
||||
|
||||
return require('packer').startup({function()
|
||||
-- Make packer manage itself.
|
||||
use 'wbthomason/packer.nvim'
|
||||
return require("packer").startup({
|
||||
function()
|
||||
-- Make packer manage itself.
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
use 'lewis6991/impatient.nvim'
|
||||
use "lewis6991/impatient.nvim"
|
||||
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = [[require('plugins.lualine')]],
|
||||
requires = {'kyazdani42/nvim-web-devicons', opt = true}
|
||||
}
|
||||
use {
|
||||
'mhinz/vim-sayonara',
|
||||
config = [[require('plugins.sayonara')]],
|
||||
}
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
config = [[require('plugins.nvim-treesitter')]],
|
||||
}
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = [[require('plugins.lualine')]],
|
||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
||||
})
|
||||
use({
|
||||
"mhinz/vim-sayonara",
|
||||
config = [[require('plugins.sayonara')]],
|
||||
})
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = [[require('plugins.nvim-treesitter')]],
|
||||
})
|
||||
|
||||
use {
|
||||
'neovim/nvim-lspconfig',
|
||||
'nvim-lua/lsp-status.nvim'
|
||||
}
|
||||
use { "jose-elias-alvarez/null-ls.nvim",
|
||||
config = [[require('plugins.lspconfig')]],
|
||||
requires = {"nvim-lua/plenary.nvim", "neovim/nvim-lspconfig"}
|
||||
}
|
||||
use({
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-lua/lsp-status.nvim",
|
||||
})
|
||||
use({
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = [[require('plugins.lspconfig')]],
|
||||
requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
||||
})
|
||||
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
config = [[require('plugins.telescope')]],
|
||||
requires = 'nvim-lua/plenary.nvim'
|
||||
}
|
||||
use {
|
||||
'folke/trouble.nvim',
|
||||
config = [[require('plugins.trouble')]],
|
||||
requires = 'kyazdani42/nvim-web-devicons'
|
||||
}
|
||||
use {
|
||||
'folke/todo-comments.nvim',
|
||||
config = [[require('plugins.todo-comments')]],
|
||||
requires = 'nvim-lua/plenary.nvim'
|
||||
}
|
||||
use 'folke/lsp-colors.nvim'
|
||||
use {
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
config = [[require('plugins.nvim-tree')]],
|
||||
requires = 'kyazdani42/nvim-web-devicons'
|
||||
}
|
||||
use {
|
||||
'ray-x/lsp_signature.nvim',
|
||||
}
|
||||
use 'mhinz/vim-startify'
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = [[require('plugins.telescope')]],
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
})
|
||||
use({
|
||||
"folke/trouble.nvim",
|
||||
config = [[require('plugins.trouble')]],
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
})
|
||||
use({
|
||||
"folke/todo-comments.nvim",
|
||||
config = [[require('plugins.todo-comments')]],
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
})
|
||||
use "folke/lsp-colors.nvim"
|
||||
use({
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
config = [[require('plugins.nvim-tree')]],
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
})
|
||||
use({
|
||||
"ray-x/lsp_signature.nvim",
|
||||
})
|
||||
use "mhinz/vim-startify"
|
||||
|
||||
use {
|
||||
'L3MON4D3/LuaSnip',
|
||||
config = [[require('plugins.luasnip')]],
|
||||
}
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
config = [[require('plugins.nvim-cmp')]],
|
||||
requires = {
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'hrsh7th/cmp-path',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
}
|
||||
}
|
||||
use {
|
||||
'windwp/nvim-autopairs',
|
||||
after = { "nvim-cmp" },
|
||||
config = [[require('plugins.nvim-autopairs')]],
|
||||
}
|
||||
use {
|
||||
'numToStr/Comment.nvim',
|
||||
config = [[require('plugins.comment')]],
|
||||
}
|
||||
use({
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = [[require('plugins.luasnip')]],
|
||||
})
|
||||
use({
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = [[require('plugins.nvim-cmp')]],
|
||||
requires = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-path",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
})
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
after = { "nvim-cmp" },
|
||||
config = [[require('plugins.nvim-autopairs')]],
|
||||
})
|
||||
use({
|
||||
"numToStr/Comment.nvim",
|
||||
config = [[require('plugins.comment')]],
|
||||
})
|
||||
|
||||
use {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
config = [[require('plugins.indent-blankline')]],
|
||||
}
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = [[require('plugins.gitsigns')]],
|
||||
requires = 'nvim-lua/plenary.nvim'
|
||||
}
|
||||
use 'tpope/vim-fugitive'
|
||||
use({
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
config = [[require('plugins.indent-blankline')]],
|
||||
})
|
||||
use({
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = [[require('plugins.gitsigns')]],
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
})
|
||||
use "tpope/vim-fugitive"
|
||||
|
||||
use 'editorconfig/editorconfig-vim'
|
||||
use "editorconfig/editorconfig-vim"
|
||||
|
||||
use {
|
||||
'lervag/vimtex',
|
||||
config = [[require('plugins.vimtex')]],
|
||||
}
|
||||
use({
|
||||
"lervag/vimtex",
|
||||
config = [[require('plugins.vimtex')]],
|
||||
})
|
||||
|
||||
-- Themes
|
||||
use 'bluz71/vim-moonfly-colors'
|
||||
use 'folke/tokyonight.nvim'
|
||||
use 'marko-cerovac/material.nvim'
|
||||
use 'monsonjeremy/onedark.nvim'
|
||||
use 'pappasam/papercolor-theme-slim'
|
||||
use 'rafamadriz/neon'
|
||||
use 'rebelot/kanagawa.nvim'
|
||||
end,
|
||||
config = {
|
||||
max_jobs = 10,
|
||||
}})
|
||||
-- Themes
|
||||
use "bluz71/vim-moonfly-colors"
|
||||
use "folke/tokyonight.nvim"
|
||||
use "marko-cerovac/material.nvim"
|
||||
use "monsonjeremy/onedark.nvim"
|
||||
use "pappasam/papercolor-theme-slim"
|
||||
use "rafamadriz/neon"
|
||||
use "rebelot/kanagawa.nvim"
|
||||
end,
|
||||
config = {
|
||||
max_jobs = 10,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local map = vim.api.nvim_set_keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
map('n', 'gz', ':Sayonara!<cr>', opts)
|
||||
map("n", "gz", ":Sayonara!<cr>", opts)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require('telescope').setup{}
|
||||
|
||||
require("telescope").setup({})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<C-k>", "<cmd>Telescope<cr>", { noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<C-p>", "<cmd>Telescope git_files<cr>", { noremap = true })
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
require('todo-comments').setup {}
|
||||
require("todo-comments").setup({})
|
||||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>xt",
|
||||
"<cmd>TodoTelescope<cr>",
|
||||
{silent = true, noremap = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap("n", "<leader>xt", "<cmd>TodoTelescope<cr>", { silent = true, noremap = true })
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
require("trouble").setup {
|
||||
use_diagnostic_signs = true,
|
||||
}
|
||||
|
||||
require("trouble").setup({
|
||||
use_diagnostic_signs = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>TroubleToggle<cr>", { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>xx",
|
||||
"<cmd>TroubleToggle<cr>",
|
||||
{silent = true, noremap = true}
|
||||
"n",
|
||||
"<leader>xw",
|
||||
"<cmd>Trouble lsp_workspace_diagnostics<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>xw",
|
||||
"<cmd>Trouble lsp_workspace_diagnostics<cr>",
|
||||
{silent = true, noremap = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>xd",
|
||||
"<cmd>Trouble lsp_document_diagnostics<cr>",
|
||||
{silent = true, noremap = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>xl",
|
||||
"<cmd>Trouble loclist<cr>",
|
||||
{silent = true, noremap = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>xq",
|
||||
"<cmd>Trouble quickfix<cr>",
|
||||
{silent = true, noremap = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"gR",
|
||||
"<cmd>Trouble lsp_references<cr>",
|
||||
{silent = true, noremap = true}
|
||||
"n",
|
||||
"<leader>xd",
|
||||
"<cmd>Trouble lsp_document_diagnostics<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap("n", "<leader>xl", "<cmd>Trouble loclist<cr>", { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>xq", "<cmd>Trouble quickfix<cr>", { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "gR", "<cmd>Trouble lsp_references<cr>", { silent = true, noremap = true })
|
||||
|
|
|
@ -1 +1 @@
|
|||
vim.g.vimtex_compiler_method = 'arara'
|
||||
vim.g.vimtex_compiler_method = "arara"
|
||||
|
|
|
@ -2,21 +2,21 @@ local cmd = vim.cmd
|
|||
local g = vim.g
|
||||
local opt = vim.opt
|
||||
|
||||
g.mapleader = ','
|
||||
g.maplocalleader = ','
|
||||
g.mapleader = ","
|
||||
g.maplocalleader = ","
|
||||
|
||||
opt.mouse = 'a'
|
||||
opt.clipboard = 'unnamedplus'
|
||||
opt.mouse = "a"
|
||||
opt.clipboard = "unnamedplus"
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- UI
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
opt.colorcolumn = '80'
|
||||
opt.colorcolumn = "80"
|
||||
opt.list = true
|
||||
opt.listchars = { eol = '¬', nbsp='␣', tab = '▸ ', trail = '·' }
|
||||
opt.showbreak = '↳'
|
||||
opt.signcolumn = 'yes'
|
||||
opt.listchars = { eol = "¬", nbsp = "␣", tab = "▸ ", trail = "·" }
|
||||
opt.showbreak = "↳"
|
||||
opt.signcolumn = "yes"
|
||||
|
||||
-- Resize splits on windows size changes.
|
||||
cmd [[
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
call_parentheses = "NoSingleString"
|
Loading…
Reference in New Issue