Inital Commit

This commit is contained in:
Andre Henriques 2023-05-08 18:41:49 +01:00
commit 82feb6f59f
19 changed files with 1088 additions and 0 deletions

36
after/plugin/airline.lua Normal file
View File

@ -0,0 +1,36 @@
vim.g["airline#extensions#tabline#enabled"] = 1
--vim.g.airline_left_sep = '»'
--vim.g.airline_left_sep = '▶'
--vim.g.airline_right_sep = '«'
--vim.g.airline_right_sep = '◀'
vim.g.airline_left_sep = ''
vim.g.airline_left_alt_sep = ''
vim.g.airline_right_sep = ''
vim.g.airline_right_alt_sep = ''
vim.g.airline_symbols.branch = ''
vim.g.airline_symbols.readonly = ''
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.maxlinenr = ''
-- vim.g.airline_symbols = {}
vim.g.airline_symbols.crypt = '🔒'
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.maxlinenr = ''
vim.g.airline_symbols.maxlinenr = ''
vim.g.airline_symbols.branch = ''
vim.g.airline_symbols.paste = 'ρ'
vim.g.airline_symbols.paste = 'Þ'
vim.g.airline_symbols.paste = ''
vim.g.airline_symbols.spell = ''
vim.g.airline_symbols.notexists = 'Ɇ'
vim.g.airline_symbols.whitespace = 'Ξ'
vim.g.airline_powerline_fonts = 1
-- vim.g.airline_theme='cyberpunk'

282
after/plugin/colors.lua Normal file
View File

@ -0,0 +1,282 @@
vim.opt.termguicolors = true
vim.ayucolor="dark"
vim.g.indentLine_char = ""
vim.g.indentLine_first_char = ""
vim.g.indentLine_showFirstIndentLevel = 1
vim.g.indentLine_setColors = 0
vim.opt.cursorline = true
-- vim.g.cyberpunk_cursorline='black'
-- vim.cmd('colorscheme ayu')
-- vim.cmd('colorscheme night_owl_light')
-- vim.cmd('colorscheme eva01')
-- vim.cmd('colorscheme cyberpunk')
vim.cmd('colorscheme catppuccin-latte')
-- examples for your init.lua
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- setup with some options
require("nvim-tree").setup{ -- BEGIN_DEFAULT_OPTS
auto_reload_on_write = true,
create_in_closed_folder = false,
disable_netrw = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
ignore_buffer_on_setup = false,
open_on_setup = false,
open_on_setup_file = false,
open_on_tab = false,
ignore_buf_on_tab_change = {},
sort_by = "name",
root_dirs = {},
prefer_startup_root = false,
sync_root_with_cwd = false,
reload_on_bufenter = false,
respect_buf_cwd = false,
on_attach = "disable",
remove_keymaps = false,
select_prompts = false,
view = {
adaptive_size = false,
centralize_selection = false,
width = 30,
hide_root_folder = false,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",
width = 30,
height = 30,
row = 1,
col = 1,
},
},
},
renderer = {
add_trailing = false,
group_empty = false,
highlight_git = false,
full_name = false,
highlight_opened_files = "none",
root_folder_modifier = ":~",
indent_width = 2,
indent_markers = {
enable = false,
inline_arrows = true,
icons = {
corner = "",
edge = "",
item = "",
bottom = "",
none = " ",
},
},
icons = {
webdev_colors = true,
git_placement = "before",
padding = " ",
symlink_arrow = "",
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "",
symlink = "",
bookmark = "",
folder = {
arrow_closed = "",
arrow_open = "",
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
},
git = {
unstaged = "🙄",
staged = "🥺",
unmerged = "🫢",
renamed = "📛",
untracked = "💫",
deleted = "🗑️",
ignored = "🤷",
},
},
},
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
symlink_destination = true,
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = false,
update_root = false,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = true,
show_on_dirs = false,
debounce_delay = 50,
icons = { error = "☣️ ", warning = "😞", hint = "❤️ ", info = " " }
,
},
filters = {
dotfiles = false,
custom = {},
exclude = {},
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
},
git = {
enable = true,
ignore = true,
show_on_dirs = true,
timeout = 400,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
expand_all = {
max_folder_discovery = 300,
exclude = {},
},
file_popup = {
open_win_config = {
col = 1,
row = 1,
relative = "cursor",
border = "shadow",
style = "minimal",
},
},
open_file = {
quit_on_open = false,
resize_window = true,
window_picker = {
enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
remove_file = {
close_window = true,
},
},
trash = {
cmd = "gio trash",
require_confirm = true,
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
notify = {
threshold = vim.log.levels.INFO,
},
}
local hls = {
PmenuSel = { bg = "#282C34", fg = "NONE" },
Pmenu = { fg = "#C5CDD9", bg = "#22252A" },
CmpItemAbbrDeprecated = { fg = "#7E8294", bg = "NONE", strikethrough = true },
CmpItemAbbrMatch = { fg = "#82AAFF", bg = "NONE", bold = true },
CmpItemAbbrMatchFuzzy = { fg = "#82AAFF", bg = "NONE", bold = true },
CmpItemMenu = { fg = "#C792EA", bg = "NONE", italic = true },
CmpItemKindField = { fg = "#EED8DA", bg = "#B5585F" },
CmpItemKindProperty = { fg = "#EED8DA", bg = "#B5585F" },
CmpItemKindEvent = { fg = "#EED8DA", bg = "#B5585F" },
CmpItemKindText = { fg = "#C3E88D", bg = "#9FBD73" },
CmpItemKindEnum = { fg = "#C3E88D", bg = "#9FBD73" },
CmpItemKindKeyword = { fg = "#C3E88D", bg = "#9FBD73" },
CmpItemKindConstant = { fg = "#FFE082", bg = "#D4BB6C" },
CmpItemKindConstructor = { fg = "#FFE082", bg = "#D4BB6C" },
CmpItemKindReference = { fg = "#FFE082", bg = "#D4BB6C" },
CmpItemKindFunction = { fg = "#EADFF0", bg = "#A377BF" },
CmpItemKindStruct = { fg = "#EADFF0", bg = "#A377BF" },
CmpItemKindClass = { fg = "#EADFF0", bg = "#A377BF" },
CmpItemKindModule = { fg = "#EADFF0", bg = "#A377BF" },
CmpItemKindOperator = { fg = "#EADFF0", bg = "#A377BF" },
CmpItemKindVariable = { fg = "#C5CDD9", bg = "#7E8294" },
CmpItemKindFile = { fg = "#C5CDD9", bg = "#7E8294" },
CmpItemKindUnit = { fg = "#F5EBD9", bg = "#D4A959" },
CmpItemKindSnippet = { fg = "#F5EBD9", bg = "#D4A959" },
CmpItemKindFolder = { fg = "#F5EBD9", bg = "#D4A959" },
CmpItemKindMethod = { fg = "#DDE5F5", bg = "#6C8ED4" },
CmpItemKindValue = { fg = "#DDE5F5", bg = "#6C8ED4" },
CmpItemKindEnumMember = { fg = "#DDE5F5", bg = "#6C8ED4" },
CmpItemKindInterface = { fg = "#D8EEEB", bg = "#58B5A8" },
CmpItemKindColor = { fg = "#D8EEEB", bg = "#58B5A8" },
CmpItemKindTypeParameter = { fg = "#D8EEEB", bg = "#58B5A8" },
}
for key, value in pairs(hls) do
vim.api.nvim_set_hl(0, key, value)
end

13
after/plugin/keys.lua Normal file
View File

@ -0,0 +1,13 @@
-- This file sets the fzf and side tree
vim.keymap.set("n", " ", "<Nop>", { silent = true, remap = false })
vim.g.mapleader = " "
vim.g.maplocalleader = " "
local opts = { noremap=true }
vim.keymap.set('n', '<leader>f', function () vim.cmd('Telescope find_files') end, { remap = true })
vim.keymap('v', '<leader>c', function () vim.cmd('\'<,\'>Commentary') end, { noremap = true, silent = true })
vim.keymap('n', '<leader>c', function () vim.cmd('Commentary') end, { noremap = true, silent = true })
vim.keymap.set("n", "<C-F>", "<cmd>NvimTreeToggle<CR>", { silent = true })

10
after/plugin/svelte.lua Normal file
View File

@ -0,0 +1,10 @@
-- To disable indentation on the script and style
-- vim.g.svelte_indent_script = 0
-- vim.g.svelte_indent_style = 0
vim.g.svelte_preprocessor_tags = {
{name = "ts", tag = "script", as = "typescript"},
}
vim.g.svelte_preprocessors = {"typescript", "scss"}

View File

@ -0,0 +1,5 @@
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true
}
}

1
init.lua Normal file
View File

@ -0,0 +1 @@
require('andr3')

7
lua/andr3/init.lua Normal file
View File

@ -0,0 +1,7 @@
if vim.g.vscode then
-- VSCode extension
else
require('andr3.set')
require('andr3.packer')
require('andr3.lsp')
end

12
lua/andr3/langs/ccls.lua Normal file
View File

@ -0,0 +1,12 @@
local O = {};
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig['ccls'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
end
return O

View File

@ -0,0 +1,9 @@
local O = {}
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig.prismals.setup{}
end
return O

16
lua/andr3/langs/rust.lua Normal file
View File

@ -0,0 +1,16 @@
local O = {}
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig['rust_analyzer'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
-- Server-specific settings...
settings = {
["rust-analyzer"] = {}
}
}
end
return O

View File

@ -0,0 +1,10 @@
local O = {};
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig['svelte'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
end
return O

12
lua/andr3/langs/ts.lua Normal file
View File

@ -0,0 +1,12 @@
local O = {};
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig['tsserver'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
end
return O

12
lua/andr3/langs/vlang.lua Normal file
View File

@ -0,0 +1,12 @@
local O = {};
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig.vls.setup{
on_attach=on_attach,
lsp_flags=lsp_flags,
capabilities=capabilities
}
end
return O

286
lua/andr3/lsp.lua Normal file
View File

@ -0,0 +1,286 @@
require 'andr3.lsp_adds.prettier'
require 'andr3.lsp_adds.null-ls'
-- Items
require('vim.lsp.protocol').CompletionItemKind = {
'', -- Text
'', -- Method
'', -- Function
'', -- Constructor
'', -- Field
'', -- Variable
'', -- Class
'', -- Interface
'', -- Module
'', -- Property
'', -- Unit
'', -- Value
'', -- Enum
'', -- Keyword
'', -- Snippet
'', -- Color
'', -- File
'', -- Reference
'', -- Folder
'', -- EnumMember
'', -- Constant
'', -- Struct
'', -- Event
'', -- Operator
'', -- TypeParameter
}
vim.diagnostic.config({ virtual_text = { prefix = '🅰', } })
local warn = "😞";
local signs = { Error = "☣️ ", Warn = 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 })
end
local kind_icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = ""
}
-- lspkind
require('lspkind').init({
mode = 'symbol_text',
preset = 'codicons',
symbol_map = kind_icons,
})
-- Saga
local keymap = vim.keymap.set
local saga = require'lspsaga'
-- saga.init_lsp_saga{
saga.setup{
border_style = "single",
saga_winblend = 0,
move_in_saga = { prev = '<C-p>',next = '<C-n>'},
diagnostic_header = { "☣️ ", warn, "❤️ ", "🆓" },
max_preview_lines = 10,
code_action_icon = "🈁",
code_action_num_shortcut = true,
code_action_lightbulb = {
enable = true,
enable_in_insert = true,
cache_code_action = true,
sign = true,
update_time = 150,
sign_priority = 20,
virtual_text = true,
},
finder_icons = {
def = '',
ref = '',
link = '',
},
finder_request_timeout = 1500,
finder_action_keys = {
open = {'o', '<CR>'},
vsplit = 's',
split = 'i',
tabe = 't',
quit = {'q', '<ESC>'},
},
code_action_keys = {
quit = 'q',
exec = '<CR>',
},
definition_action_keys = {
edit = '<C-c>o',
vsplit = '<C-c>v',
split = '<C-c>i',
tabe = '<C-c>t',
quit = 'q',
},
rename_action_quit = '<C-c>',
rename_in_select = true,
symbol_in_winbar = {
in_custom = false,
enable = true,
separator = '',
show_file = true,
file_formatter = "",
click_support = false,
},
show_outline = {
win_position = 'right',
win_with = '',
win_width = 30,
auto_enter = true,
auto_preview = true,
virt_text = '',
jump_key = 'o',
auto_refresh = true,
},
custom_kind = {},
server_filetype_map = {},
}
keymap("n", "gh", "<cmd>Lspsaga lsp_finder<CR>", { silent = true })
keymap({"n","v"}, "<leader>ca", function () saga.code_action() end, {})
keymap("n", "gr", "<cmd>Lspsaga rename<CR>", { silent = true })
keymap("n", "gd", "<cmd>Lspsaga peek_definition<CR>", { silent = true })
keymap("n", "<leader>cd", "<cmd>Lspsaga show_line_diagnostics<CR>", { silent = true })
keymap("n", "<leader>cd", "<cmd>Lspsaga show_cursor_diagnostics<CR>", { silent = true })
keymap("n", "[e", "<cmd>Lspsaga diagnostic_jump_prev<CR>", { silent = true })
keymap("n", "]e", "<cmd>Lspsaga diagnostic_jump_next<CR>", { silent = true })
keymap("n", "[E", function()
require("lspsaga.diagnostic").goto_prev({ severity = vim.diagnostic.severity.ERROR })
end, { silent = true })
keymap("n", "]E", function()
require("lspsaga.diagnostic").goto_next({ severity = vim.diagnostic.severity.ERROR })
end, { silent = true })
keymap("n","<leader>o", "<cmd>LSoutlineToggle<CR>",{ silent = true })
keymap("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true })
keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm<CR>", { silent = true })
keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm lazygit<CR>", { silent = true })
keymap("t", "<A-d>", [[<C-\><C-n><cmd>Lspsaga close_floaterm<CR>]], { silent = true })
-- Comp
local cmp = require'cmp'
cmp.setup{
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
window = {
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
col_offset = -3,
side_padding = 0,
},
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = " " .. strings[1] .. " "
if entry.completion_item.detail then
kind.menu = ' "'..entry.completion_item.detail..'"'
end
kind.menu = (kind.menu or "").." (" .. strings[2] .. ") "
return kind
end,
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' },
}, {
{ name = 'buffer' },
})
}
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
-- Set up lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap=true, silent=true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>gf', function() vim.lsp.buf.format { async = true } end, bufopts)
end
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
require 'andr3.langs.rust'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.ts'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.prisma'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.svelte'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.ccls'.setup(on_attach, lsp_flags, capabilities)

View File

@ -0,0 +1,7 @@
local null_ls = require('null-ls')
null_ls.setup({
sources = {
null_ls.builtins.diagnostics.eslint,
},
})

View File

@ -0,0 +1,35 @@
-- prettier
local prettier = require("prettier")
prettier.setup({
bin = 'prettier',
filetypes = {
"css",
"graphql",
"html",
"javascript",
"javascriptreact",
"json",
"less",
"markdown",
"scss",
"typescript",
"typescriptreact",
"yaml",
"svelte",
},
["null-ls"] = {
condition = function()
return prettier.config_exists({
-- if `false`, skips checking `package.json` for `"prettier"` key
check_package_json = true,
})
end,
runtime_condition = function(params)
-- return false to skip running prettier
return true
end,
timeout = 5000,
}
})

71
lua/andr3/packer.lua Normal file
View File

@ -0,0 +1,71 @@
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
use 'wbthomason/packer.nvim'
-- themes
use 'macguirerintoul/night_owl_light.vim'
use 'ayu-theme/ayu-vim'
use 'hachy/eva01.vim'
use 'thedenisnikulin/vim-cyberpunk'
use { "catppuccin/nvim", as = "catppuccin" }
-- other stuff
use 'neovim/nvim-lspconfig'
use 'jose-elias-alvarez/null-ls.nvim'
use 'MunifTanjim/prettier.nvim'
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-cmdline'
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/vim-vsnip'
use 'chrisbra/vim-commentary'
use 'onsails/lspkind.nvim'
use({
"glepnir/lspsaga.nvim",
branch = "main",
})
-- use 'junegunn/fzf.vim'
use 'nvim-telescope/telescope.nvim'
use 'othree/html5.vim'
use 'pangloss/vim-javascript'
use 'evanleck/vim-svelte'
use 'vim-airline/vim-airline'
use 'vim-airline/vim-airline-themes'
use 'airblade/vim-gitgutter'
use 'mbbill/undotree'
use "nvim-lua/plenary.nvim"
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional, for file icons
},
tag = 'nightly' -- optional, updated every week. (see issue #1193)
}
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
}
end)

20
lua/andr3/set.lua Normal file
View File

@ -0,0 +1,20 @@
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.laststatus = 3
vim.opt.expandtab = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.smartindent = true
vim.opt.wrap = true
vim.opt.clipboard = "unnamedplus"
vim.opt.signcolumn = "number"
vim.g.mapleader = " "
vim.g.maplocalleader = " "

244
plugin/packer_compiled.lua Normal file
View File

@ -0,0 +1,244 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/andr3/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/andr3/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/andr3/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/andr3/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/andr3/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["ayu-vim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/ayu-vim",
url = "https://github.com/ayu-theme/ayu-vim"
},
catppuccin = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/catppuccin",
url = "https://github.com/catppuccin/nvim"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-cmdline"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-path"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["eva01.vim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/eva01.vim",
url = "https://github.com/hachy/eva01.vim"
},
["html5.vim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/html5.vim",
url = "https://github.com/othree/html5.vim"
},
["lspkind.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
url = "https://github.com/onsails/lspkind.nvim"
},
["lspsaga.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
url = "https://github.com/glepnir/lspsaga.nvim"
},
["night_owl_light.vim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/night_owl_light.vim",
url = "https://github.com/macguirerintoul/night_owl_light.vim"
},
["null-ls.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
url = "https://github.com/nvim-tree/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["prettier.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/prettier.nvim",
url = "https://github.com/MunifTanjim/prettier.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
undotree = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/undotree",
url = "https://github.com/mbbill/undotree"
},
["vim-airline"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-airline",
url = "https://github.com/vim-airline/vim-airline"
},
["vim-airline-themes"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-airline-themes",
url = "https://github.com/vim-airline/vim-airline-themes"
},
["vim-commentary"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-commentary",
url = "https://github.com/chrisbra/vim-commentary"
},
["vim-cyberpunk"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-cyberpunk",
url = "https://github.com/thedenisnikulin/vim-cyberpunk"
},
["vim-gitgutter"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
url = "https://github.com/airblade/vim-gitgutter"
},
["vim-javascript"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-javascript",
url = "https://github.com/pangloss/vim-javascript"
},
["vim-svelte"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-svelte",
url = "https://github.com/evanleck/vim-svelte"
},
["vim-vsnip"] = {
loaded = true,
path = "/home/andr3/.local/share/nvim/site/pack/packer/start/vim-vsnip",
url = "https://github.com/hrsh7th/vim-vsnip"
}
}
time([[Defining packer_plugins]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end