mirror of https://github.com/E-Almqvist/dotfiles
commit
954ccc021e
@ -0,0 +1 @@ |
|||||||
|
require('Comment').setup() |
@ -0,0 +1,48 @@ |
|||||||
|
local lsp = require("lsp-zero") |
||||||
|
|
||||||
|
lsp.preset("recommended") |
||||||
|
|
||||||
|
lsp.ensure_installed({ |
||||||
|
"tsserver", |
||||||
|
"eslint", |
||||||
|
"lua_ls", |
||||||
|
"rust_analyzer", |
||||||
|
"pyright", |
||||||
|
}) |
||||||
|
|
||||||
|
local cmp = require("cmp") |
||||||
|
local cmp_select = { behavior = cmp.SelectBehavior.Select } |
||||||
|
local cmp_mappings = lsp.defaults.cmp_mappings({ |
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select), |
||||||
|
["<C-n>"] = cmp.mapping.select_next_item(cmp_select), |
||||||
|
["<C-y>"] = cmp.mapping.confirm({ select = true }), |
||||||
|
["<C-Space>"] = cmp.mapping.complete(), |
||||||
|
}) |
||||||
|
|
||||||
|
lsp.set_preferences({ |
||||||
|
sign_icons = {} |
||||||
|
}) |
||||||
|
|
||||||
|
lsp.setup_nvim_cmp({ |
||||||
|
mapping = cmp_mappings |
||||||
|
}) |
||||||
|
|
||||||
|
lsp.on_attach(function(client, bufnr) |
||||||
|
local opts = { buffer = bufnr, remap = false } |
||||||
|
|
||||||
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) |
||||||
|
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) |
||||||
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts) |
||||||
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts) |
||||||
|
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) |
||||||
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) |
||||||
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts) |
||||||
|
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts) |
||||||
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts) |
||||||
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts) |
||||||
|
vim.keymap.set("n", "<A-g>", function() |
||||||
|
vim.lsp.buf.format { async = true } |
||||||
|
end, opts) |
||||||
|
end) |
||||||
|
|
||||||
|
lsp.setup() |
@ -0,0 +1 @@ |
|||||||
|
require("lualine").setup() |
@ -0,0 +1,23 @@ |
|||||||
|
require("presence").setup({ |
||||||
|
-- General options |
||||||
|
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`) |
||||||
|
neovim_image_text = "Neovim", -- Text displayed when hovered over the Neovim image |
||||||
|
main_image = "file", -- Main image display (either "neovim" or "file") |
||||||
|
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended) |
||||||
|
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") |
||||||
|
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`) |
||||||
|
enable_line_number = false, -- Displays the current line number instead of the current project |
||||||
|
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches |
||||||
|
buttons = false, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table) |
||||||
|
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference) |
||||||
|
show_time = false, -- Show the timer |
||||||
|
|
||||||
|
-- Rich Presence text options |
||||||
|
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string) |
||||||
|
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string) |
||||||
|
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string) |
||||||
|
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string) |
||||||
|
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string) |
||||||
|
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string) |
||||||
|
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string) |
||||||
|
}) |
@ -0,0 +1,16 @@ |
|||||||
|
-- Treesitter init |
||||||
|
require("nvim-treesitter.configs").setup({ |
||||||
|
-- A list of parser names, or "all" (the five listed parsers should always be installed) |
||||||
|
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "typescript", "javascript", "python", "rust" }, |
||||||
|
|
||||||
|
-- Install parsers synchronously (only applied to `ensure_installed`) |
||||||
|
sync_install = false, |
||||||
|
|
||||||
|
-- Automatically install missing parsers when entering buffer |
||||||
|
-- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally |
||||||
|
auto_install = true, |
||||||
|
highlight = { |
||||||
|
enable = true, |
||||||
|
additional_vim_regex_highlighting = false, |
||||||
|
}, |
||||||
|
}) |
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@ |
|||||||
{ |
|
||||||
"coc.source.OmniSharp.enable" : true, |
|
||||||
"coc.source.OmniSharp.triggerCharacters": "." |
|
||||||
} |
|
@ -1,151 +0,0 @@ |
|||||||
" Vim color file |
|
||||||
" 111015 |
|
||||||
" Created by with ThemeCreator (https://github.com/mswift42/themecreator) |
|
||||||
|
|
||||||
hi clear |
|
||||||
|
|
||||||
if exists("syntax on") |
|
||||||
syntax reset |
|
||||||
endif |
|
||||||
|
|
||||||
set t_Co=256 |
|
||||||
let g:colors_name = "111015" |
|
||||||
|
|
||||||
|
|
||||||
" Define reusable colorvariables. |
|
||||||
let s:bg="#111015" |
|
||||||
let s:fg="#b1b1b1" |
|
||||||
let s:fg2="#a3a3a3" |
|
||||||
let s:fg3="#959595" |
|
||||||
let s:fg4="#878787" |
|
||||||
let s:bg2="#242328" |
|
||||||
let s:bg3="#37363a" |
|
||||||
let s:bg4="#4a494d" |
|
||||||
let s:keyword="#a3d4e8" |
|
||||||
let s:builtin="#c4cbee" |
|
||||||
let s:const= "#a3d6cc" |
|
||||||
let s:comment="#5d5d5d" |
|
||||||
let s:func="#f1c1bd" |
|
||||||
let s:str="#e6c2db" |
|
||||||
let s:type="#c1d2b1" |
|
||||||
let s:var="#e1c9aa" |
|
||||||
let s:warning="#e81050" |
|
||||||
let s:warning2="#e86310" |
|
||||||
|
|
||||||
exe 'hi Normal guifg='s:fg' guibg='s:bg |
|
||||||
exe 'hi Cursor guifg='s:bg' guibg='s:fg |
|
||||||
exe 'hi CursorLine guibg='s:bg2 |
|
||||||
exe 'hi CursorLineNr guifg='s:str' guibg='s:bg |
|
||||||
exe 'hi CursorColumn guibg='s:bg2 |
|
||||||
exe 'hi ColorColumn guibg='s:bg2 |
|
||||||
exe 'hi LineNr guifg='s:fg2' guibg='s:bg2 |
|
||||||
exe 'hi VertSplit guifg='s:fg3' guibg='s:bg3 |
|
||||||
exe 'hi MatchParen guifg='s:warning2' gui=underline' |
|
||||||
exe 'hi StatusLine guifg='s:fg2' guibg='s:bg3' gui=bold' |
|
||||||
exe 'hi Pmenu guifg='s:fg' guibg='s:bg2 |
|
||||||
exe 'hi PmenuSel guibg='s:bg3 |
|
||||||
exe 'hi IncSearch guifg='s:bg' guibg='s:keyword |
|
||||||
exe 'hi Search gui=underline' |
|
||||||
exe 'hi Directory guifg='s:const |
|
||||||
exe 'hi Folded guifg='s:fg4' guibg='s:bg |
|
||||||
exe 'hi WildMenu guifg='s:str' guibg='s:bg |
|
||||||
|
|
||||||
exe 'hi Boolean guifg='s:const |
|
||||||
exe 'hi Character guifg='s:const |
|
||||||
exe 'hi Comment guifg='s:comment |
|
||||||
exe 'hi Conditional guifg='s:keyword |
|
||||||
exe 'hi Constant guifg='s:const |
|
||||||
exe 'hi Todo guibg='s:bg |
|
||||||
exe 'hi Define guifg='s:keyword |
|
||||||
exe 'hi DiffAdd guifg=#fafafa guibg=#123d0f gui=bold' |
|
||||||
exe 'hi DiffDelete guibg='s:bg2 |
|
||||||
exe 'hi DiffChange guibg=#151b3c guifg=#fafafa' |
|
||||||
exe 'hi DiffText guifg=#ffffff guibg=#ff0000 gui=bold' |
|
||||||
exe 'hi ErrorMsg guifg='s:warning' guibg='s:bg2' gui=bold' |
|
||||||
exe 'hi WarningMsg guifg='s:fg' guibg='s:warning2 |
|
||||||
exe 'hi Float guifg='s:const |
|
||||||
exe 'hi Function guifg='s:func |
|
||||||
exe 'hi Identifier guifg='s:type' gui=italic' |
|
||||||
exe 'hi Keyword guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi Label guifg='s:var |
|
||||||
exe 'hi NonText guifg='s:bg4' guibg='s:bg2 |
|
||||||
exe 'hi Number guifg='s:const |
|
||||||
exe 'hi Operator guifg='s:keyword |
|
||||||
exe 'hi PreProc guifg='s:keyword |
|
||||||
exe 'hi Special guifg='s:fg |
|
||||||
exe 'hi SpecialKey guifg='s:fg2' guibg='s:bg2 |
|
||||||
exe 'hi Statement guifg='s:keyword |
|
||||||
exe 'hi StorageClass guifg='s:type' gui=italic' |
|
||||||
exe 'hi String guifg='s:str |
|
||||||
exe 'hi Tag guifg='s:keyword |
|
||||||
exe 'hi Title guifg='s:fg' gui=bold' |
|
||||||
exe 'hi Todo guifg='s:fg2' gui=inverse,bold' |
|
||||||
exe 'hi Type guifg='s:type |
|
||||||
exe 'hi Underlined gui=underline' |
|
||||||
|
|
||||||
" Neovim Terminal Mode |
|
||||||
let g:terminal_color_0 = s:bg |
|
||||||
let g:terminal_color_1 = s:warning |
|
||||||
let g:terminal_color_2 = s:keyword |
|
||||||
let g:terminal_color_3 = s:bg4 |
|
||||||
let g:terminal_color_4 = s:func |
|
||||||
let g:terminal_color_5 = s:builtin |
|
||||||
let g:terminal_color_6 = s:fg3 |
|
||||||
let g:terminal_color_7 = s:str |
|
||||||
let g:terminal_color_8 = s:bg2 |
|
||||||
let g:terminal_color_9 = s:warning2 |
|
||||||
let g:terminal_color_10 = s:fg2 |
|
||||||
let g:terminal_color_11 = s:var |
|
||||||
let g:terminal_color_12 = s:type |
|
||||||
let g:terminal_color_13 = s:const |
|
||||||
let g:terminal_color_14 = s:fg4 |
|
||||||
let g:terminal_color_15 = s:comment |
|
||||||
|
|
||||||
" Ruby Highlighting |
|
||||||
exe 'hi rubyAttribute guifg='s:builtin |
|
||||||
exe 'hi rubyLocalVariableOrMethod guifg='s:var |
|
||||||
exe 'hi rubyGlobalVariable guifg='s:var' gui=italic' |
|
||||||
exe 'hi rubyInstanceVariable guifg='s:var |
|
||||||
exe 'hi rubyKeyword guifg='s:keyword |
|
||||||
exe 'hi rubyKeywordAsMethod guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi rubyClassDeclaration guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi rubyClass guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi rubyNumber guifg='s:const |
|
||||||
|
|
||||||
" Python Highlighting |
|
||||||
exe 'hi pythonBuiltinFunc guifg='s:builtin |
|
||||||
|
|
||||||
" Go Highlighting |
|
||||||
exe 'hi goBuiltins guifg='s:builtin |
|
||||||
let g:go_highlight_array_whitespace_error = 1 |
|
||||||
let g:go_highlight_build_constraints = 1 |
|
||||||
let g:go_highlight_chan_whitespace_error = 1 |
|
||||||
let g:go_highlight_extra_types = 1 |
|
||||||
let g:go_highlight_fields = 1 |
|
||||||
let g:go_highlight_format_strings = 1 |
|
||||||
let g:go_highlight_function_calls = 1 |
|
||||||
let g:go_highlight_function_parameters = 1 |
|
||||||
let g:go_highlight_functions = 1 |
|
||||||
let g:go_highlight_generate_tags = 1 |
|
||||||
let g:go_highlight_operators = 1 |
|
||||||
let g:go_highlight_space_tab_error = 1 |
|
||||||
let g:go_highlight_string_spellcheck = 1 |
|
||||||
let g:go_highlight_types = 1 |
|
||||||
let g:go_highlight_variable_assignments = 1 |
|
||||||
let g:go_highlight_variable_declarations = 1 |
|
||||||
|
|
||||||
" Javascript Highlighting |
|
||||||
exe 'hi jsBuiltins guifg='s:builtin |
|
||||||
exe 'hi jsFunction guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi jsGlobalObjects guifg='s:type |
|
||||||
exe 'hi jsAssignmentExps guifg='s:var |
|
||||||
|
|
||||||
" Html Highlighting |
|
||||||
exe 'hi htmlLink guifg='s:var' gui=underline' |
|
||||||
exe 'hi htmlStatement guifg='s:keyword |
|
||||||
exe 'hi htmlSpecialTagName guifg='s:keyword |
|
||||||
|
|
||||||
" Markdown Highlighting |
|
||||||
exe 'hi mkdCode guifg='s:builtin |
|
||||||
|
|
||||||
|
|
@ -1,151 +0,0 @@ |
|||||||
" Vim color file |
|
||||||
" Greymatters |
|
||||||
" Created by with ThemeCreator (https://github.com/mswift42/themecreator) |
|
||||||
|
|
||||||
hi clear |
|
||||||
|
|
||||||
if exists("syntax on") |
|
||||||
syntax reset |
|
||||||
endif |
|
||||||
|
|
||||||
set t_Co=256 |
|
||||||
let g:colors_name = "Greymatters" |
|
||||||
|
|
||||||
|
|
||||||
" Define reusable colorvariables. |
|
||||||
let s:bg="#f9fbfd" |
|
||||||
let s:fg="#2f2f2f" |
|
||||||
let s:fg2="#404040" |
|
||||||
let s:fg3="#505050" |
|
||||||
let s:fg4="#616161" |
|
||||||
let s:bg2="#e5e7e9" |
|
||||||
let s:bg3="#d1d3d5" |
|
||||||
let s:bg4="#bdbfc0" |
|
||||||
let s:keyword="#3f567b" |
|
||||||
let s:builtin="#7b4135" |
|
||||||
let s:const= "#64502f" |
|
||||||
let s:comment="#949494" |
|
||||||
let s:func="#714355" |
|
||||||
let s:str="#305f5e" |
|
||||||
let s:type="#634575" |
|
||||||
let s:var="#3f5b32" |
|
||||||
let s:warning="#fa0c0c" |
|
||||||
let s:warning2="#fa7b0c" |
|
||||||
|
|
||||||
exe 'hi Normal guifg='s:fg' guibg='s:bg |
|
||||||
exe 'hi Cursor guifg='s:bg' guibg='s:fg |
|
||||||
exe 'hi CursorLine guibg='s:bg2 |
|
||||||
exe 'hi CursorLineNr guifg='s:str' guibg='s:bg |
|
||||||
exe 'hi CursorColumn guibg='s:bg2 |
|
||||||
exe 'hi ColorColumn guibg='s:bg2 |
|
||||||
exe 'hi LineNr guifg='s:fg2' guibg='s:bg2 |
|
||||||
exe 'hi VertSplit guifg='s:fg3' guibg='s:bg3 |
|
||||||
exe 'hi MatchParen guifg='s:warning2' gui=underline' |
|
||||||
exe 'hi StatusLine guifg='s:fg2' guibg='s:bg3' gui=bold' |
|
||||||
exe 'hi Pmenu guifg='s:fg' guibg='s:bg2 |
|
||||||
exe 'hi PmenuSel guibg='s:bg3 |
|
||||||
exe 'hi IncSearch guifg='s:bg' guibg='s:keyword |
|
||||||
exe 'hi Search gui=underline' |
|
||||||
exe 'hi Directory guifg='s:const |
|
||||||
exe 'hi Folded guifg='s:fg4' guibg='s:bg |
|
||||||
exe 'hi WildMenu guifg='s:str' guibg='s:bg |
|
||||||
|
|
||||||
exe 'hi Boolean guifg='s:const |
|
||||||
exe 'hi Character guifg='s:const |
|
||||||
exe 'hi Comment guifg='s:comment |
|
||||||
exe 'hi Conditional guifg='s:keyword |
|
||||||
exe 'hi Constant guifg='s:const |
|
||||||
exe 'hi Todo guibg='s:bg |
|
||||||
exe 'hi Define guifg='s:keyword |
|
||||||
exe 'hi DiffAdd guifg=#000000 guibg=#bef6dc gui=bold' |
|
||||||
exe 'hi DiffDelete guifg='s:bg2 |
|
||||||
exe 'hi DiffChange guibg=#5b76ef guifg=#ffffff' |
|
||||||
exe 'hi DiffText guifg=#ffffff guibg=#ff0000 gui=bold' |
|
||||||
exe 'hi ErrorMsg guifg='s:warning' guibg='s:bg2' gui=bold' |
|
||||||
exe 'hi WarningMsg guifg='s:fg' guibg='s:warning2 |
|
||||||
exe 'hi Float guifg='s:const |
|
||||||
exe 'hi Function guifg='s:func |
|
||||||
exe 'hi Identifier guifg='s:type' gui=italic' |
|
||||||
exe 'hi Keyword guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi Label guifg='s:var |
|
||||||
exe 'hi NonText guifg='s:bg4' guibg='s:bg2 |
|
||||||
exe 'hi Number guifg='s:const |
|
||||||
exe 'hi Operator guifg='s:keyword |
|
||||||
exe 'hi PreProc guifg='s:keyword |
|
||||||
exe 'hi Special guifg='s:fg |
|
||||||
exe 'hi SpecialKey guifg='s:fg2' guibg='s:bg2 |
|
||||||
exe 'hi Statement guifg='s:keyword |
|
||||||
exe 'hi StorageClass guifg='s:type' gui=italic' |
|
||||||
exe 'hi String guifg='s:str |
|
||||||
exe 'hi Tag guifg='s:keyword |
|
||||||
exe 'hi Title guifg='s:fg' gui=bold' |
|
||||||
exe 'hi Todo guifg='s:fg2' gui=inverse,bold' |
|
||||||
exe 'hi Type guifg='s:type |
|
||||||
exe 'hi Underlined gui=underline' |
|
||||||
|
|
||||||
" Neovim Terminal Mode |
|
||||||
let g:terminal_color_0 = s:bg |
|
||||||
let g:terminal_color_1 = s:warning |
|
||||||
let g:terminal_color_2 = s:keyword |
|
||||||
let g:terminal_color_3 = s:bg4 |
|
||||||
let g:terminal_color_4 = s:func |
|
||||||
let g:terminal_color_5 = s:builtin |
|
||||||
let g:terminal_color_6 = s:fg3 |
|
||||||
let g:terminal_color_7 = s:str |
|
||||||
let g:terminal_color_8 = s:bg2 |
|
||||||
let g:terminal_color_9 = s:warning2 |
|
||||||
let g:terminal_color_10 = s:fg2 |
|
||||||
let g:terminal_color_11 = s:var |
|
||||||
let g:terminal_color_12 = s:type |
|
||||||
let g:terminal_color_13 = s:const |
|
||||||
let g:terminal_color_14 = s:fg4 |
|
||||||
let g:terminal_color_15 = s:comment |
|
||||||
|
|
||||||
" Ruby Highlighting |
|
||||||
exe 'hi rubyAttribute guifg='s:builtin |
|
||||||
exe 'hi rubyLocalVariableOrMethod guifg='s:var |
|
||||||
exe 'hi rubyGlobalVariable guifg='s:var' gui=italic' |
|
||||||
exe 'hi rubyInstanceVariable guifg='s:var |
|
||||||
exe 'hi rubyKeyword guifg='s:keyword |
|
||||||
exe 'hi rubyKeywordAsMethod guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi rubyClassDeclaration guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi rubyClass guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi rubyNumber guifg='s:const |
|
||||||
|
|
||||||
" Python Highlighting |
|
||||||
exe 'hi pythonBuiltinFunc guifg='s:builtin |
|
||||||
|
|
||||||
" Go Highlighting |
|
||||||
exe 'hi goBuiltins guifg='s:builtin |
|
||||||
let g:go_highlight_array_whitespace_error = 1 |
|
||||||
let g:go_highlight_build_constraints = 1 |
|
||||||
let g:go_highlight_chan_whitespace_error = 1 |
|
||||||
let g:go_highlight_extra_types = 1 |
|
||||||
let g:go_highlight_fields = 1 |
|
||||||
let g:go_highlight_format_strings = 1 |
|
||||||
let g:go_highlight_function_calls = 1 |
|
||||||
let g:go_highlight_function_parameters = 1 |
|
||||||
let g:go_highlight_functions = 1 |
|
||||||
let g:go_highlight_generate_tags = 1 |
|
||||||
let g:go_highlight_operators = 1 |
|
||||||
let g:go_highlight_space_tab_error = 1 |
|
||||||
let g:go_highlight_string_spellcheck = 1 |
|
||||||
let g:go_highlight_types = 1 |
|
||||||
let g:go_highlight_variable_assignments = 1 |
|
||||||
let g:go_highlight_variable_declarations = 1 |
|
||||||
|
|
||||||
" Javascript Highlighting |
|
||||||
exe 'hi jsBuiltins guifg='s:builtin |
|
||||||
exe 'hi jsFunction guifg='s:keyword' gui=bold' |
|
||||||
exe 'hi jsGlobalObjects guifg='s:type |
|
||||||
exe 'hi jsAssignmentExps guifg='s:var |
|
||||||
|
|
||||||
" Html Highlighting |
|
||||||
exe 'hi htmlLink guifg='s:var' gui=underline' |
|
||||||
exe 'hi htmlStatement guifg='s:keyword |
|
||||||
exe 'hi htmlSpecialTagName guifg='s:keyword |
|
||||||
|
|
||||||
" Markdown Highlighting |
|
||||||
exe 'hi mkdCode guifg='s:builtin |
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@ |
|||||||
|
-- __ ___ |
||||||
|
-- __\ \ / (_)_ __ ___ |
||||||
|
-- / _ \ \ / /| | '_ ` _ \ |
||||||
|
-- | __/\ V / | | | | | | | |
||||||
|
-- \___| \_/ |_|_| |_| |_| |
||||||
|
-- epsilons Viim |
||||||
|
|
||||||
|
require("evim.init") |
||||||
|
|
||||||
|
-- Theme |
||||||
|
vim.opt.termguicolors = true |
||||||
|
vim.cmd.colorscheme "melange" |
||||||
|
|
||||||
|
-- Editor settings |
||||||
|
vim.opt.nu = true |
||||||
|
vim.opt.scrolloff = 4 |
||||||
|
|
||||||
|
vim.opt.autoindent = true |
||||||
|
vim.opt.tabstop = 4 |
||||||
|
vim.opt.shiftwidth = 4 |
||||||
|
|
||||||
|
vim.opt.hlsearch = false |
||||||
|
vim.opt.incsearch = true |
@ -1,124 +0,0 @@ |
|||||||
" _ _ __ ___ |
|
||||||
" | \ | | ___ __\ \ / (_)_ __ ___ |
|
||||||
" | \| |/ _ \/ _ \ \ / /| | '_ ` _ \ |
|
||||||
" | |\ | __/ (_) \ V / | | | | | | | |
|
||||||
" |_| \_|\___|\___/ \_/ |_|_| |_| |_| |
|
||||||
|
|
||||||
|
|
||||||
call plug#begin('~/.config/nvim/plugged') |
|
||||||
" Misc |
|
||||||
Plug 'vim-scripts/fountain.vim' |
|
||||||
Plug 'preservim/nerdtree' |
|
||||||
Plug 'numToStr/Comment.nvim' |
|
||||||
" Lang support |
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} |
|
||||||
Plug 'tpope/vim-markdown' |
|
||||||
Plug 'ap/vim-css-color' |
|
||||||
Plug 'axelf4/vim-haskell' |
|
||||||
Plug 'pantharshit00/vim-prisma' |
|
||||||
Plug 'mikelue/vim-maven-plugin' |
|
||||||
Plug 'sheerun/vim-polyglot' |
|
||||||
Plug 'ngmy/vim-rubocop' |
|
||||||
Plug 'lervag/vimtex' |
|
||||||
Plug 'arakashic/chromatica.nvim' |
|
||||||
Plug 'slim-template/vim-slim' |
|
||||||
Plug 'OmniSharp/omnisharp-vim' |
|
||||||
Plug 'ARM9/arm-syntax-vim' |
|
||||||
" Themes |
|
||||||
Plug 'ellisonleao/gruvbox.nvim' |
|
||||||
Plug 'sainnhe/gruvbox-material' |
|
||||||
Plug 'projekt0n/github-nvim-theme' |
|
||||||
" Lua Line |
|
||||||
Plug 'nvim-lualine/lualine.nvim' |
|
||||||
Plug 'kyazdani42/nvim-web-devicons' |
|
||||||
call plug#end() |
|
||||||
|
|
||||||
set nocompatible |
|
||||||
set showmatch |
|
||||||
set ignorecase |
|
||||||
|
|
||||||
" Mouse |
|
||||||
set mouse=a |
|
||||||
" map <ScrollWheelUp> <C-Y> |
|
||||||
" map <ScrollWheelDown> <C-E> |
|
||||||
|
|
||||||
set hlsearch |
|
||||||
set autoindent |
|
||||||
filetype plugin indent on |
|
||||||
syntax on |
|
||||||
|
|
||||||
set autoindent |
|
||||||
set noexpandtab |
|
||||||
set tabstop=4 |
|
||||||
set shiftwidth=4 |
|
||||||
|
|
||||||
" Dumb shit |
|
||||||
let g:ruby_recommended_style = 0 |
|
||||||
|
|
||||||
" Binds |
|
||||||
" Tabs |
|
||||||
vmap <Tab> >gv |
|
||||||
vmap <S-Tab> <gv |
|
||||||
|
|
||||||
" NERDTree |
|
||||||
nmap <silent> <C-D> :NERDTreeToggle<CR> |
|
||||||
|
|
||||||
set clipboard+=unnamedplus |
|
||||||
|
|
||||||
" Theme |
|
||||||
" set background=dark |
|
||||||
colorscheme github_dark |
|
||||||
let &showbreak = '↳ ' |
|
||||||
set laststatus=0 ruler |
|
||||||
" set rnu nu |
|
||||||
|
|
||||||
hi Normal guibg=NONE ctermbg=NONE |
|
||||||
hi EndOfBuffer guibg=NONE ctermbg=NONE |
|
||||||
hi TabLine guibg=NONE ctermbg=NONE |
|
||||||
" hi TabLineSel ctermfg=223 guibg=NONE ctermbg=NONE |
|
||||||
hi TabLineFill guibg=NONE ctermbg=NONE |
|
||||||
|
|
||||||
hi StatusLine ctermbg=NONE guibg=NONE |
|
||||||
|
|
||||||
highlight clear LineNr |
|
||||||
highlight LineNr ctermfg=NONE ctermbg=NONE |
|
||||||
|
|
||||||
" Airline |
|
||||||
let g:airline_theme='github_light' |
|
||||||
|
|
||||||
" Color stuff |
|
||||||
set encoding=UTF-8 |
|
||||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
|
||||||
if (empty($TMUX)) |
|
||||||
if (has("nvim")) |
|
||||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1 |
|
||||||
endif |
|
||||||
if (has("termguicolors")) |
|
||||||
set termguicolors |
|
||||||
endif |
|
||||||
endif |
|
||||||
|
|
||||||
" COC |
|
||||||
let g:coc_global_extensions = ['coc-prettier', 'coc-tsserver', 'coc-solargraph', 'coc-sh', 'coc-json', 'coc-html', 'coc-css', 'coc-cmake', 'coc-emmet', 'coc-vimtex'] |
|
||||||
" 'coc-clangd' |
|
||||||
" 'coc-pyright' |
|
||||||
|
|
||||||
|
|
||||||
" VIMTEX stuff |
|
||||||
let g:vimtex_view_method = 'zathura' |
|
||||||
|
|
||||||
" Or with a generic interface: |
|
||||||
let g:vimtex_view_general_viewer = 'zathura' |
|
||||||
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex' |
|
||||||
|
|
||||||
" Most VimTeX mappings rely on localleader and this can be changed with the |
|
||||||
" following line. The default is usually fine and is the symbol "\". |
|
||||||
let maplocalleader = "," |
|
||||||
set title |
|
||||||
|
|
||||||
|
|
||||||
" Lua crap |
|
||||||
lua << END |
|
||||||
require('lualine').setup() |
|
||||||
require('Comment').setup() |
|
||||||
END |
|
@ -0,0 +1,3 @@ |
|||||||
|
require("evim.remap") -- Default binds |
||||||
|
require("evim.packer") -- Package manager |
||||||
|
|
@ -0,0 +1,60 @@ |
|||||||
|
vim.cmd [[packadd packer.nvim]] |
||||||
|
|
||||||
|
return require("packer").startup(function(use) |
||||||
|
-- Core |
||||||
|
use "wbthomason/packer.nvim" |
||||||
|
use("nvim-treesitter/nvim-treesitter", { run = ":TSUpdate" }) |
||||||
|
use { |
||||||
|
"nvim-telescope/telescope.nvim", tag = "0.1.1", |
||||||
|
requires = { { "nvim-lua/plenary.nvim" } } |
||||||
|
} |
||||||
|
use { |
||||||
|
"numToStr/Comment.nvim", |
||||||
|
config = function() |
||||||
|
require("Comment").setup() |
||||||
|
end |
||||||
|
} |
||||||
|
|
||||||
|
-- Themes |
||||||
|
use "savq/melange-nvim" |
||||||
|
use "chriskempson/base16-vim" |
||||||
|
|
||||||
|
-- LSP |
||||||
|
use { |
||||||
|
"VonHeikemen/lsp-zero.nvim", |
||||||
|
branch = "v2.x", |
||||||
|
requires = { |
||||||
|
-- LSP Support |
||||||
|
{ "neovim/nvim-lspconfig" }, -- Required |
||||||
|
{ |
||||||
|
-- Optional |
||||||
|
"williamboman/mason.nvim", |
||||||
|
run = function() |
||||||
|
pcall(vim.cmd, "MasonUpdate") |
||||||
|
end, |
||||||
|
}, |
||||||
|
{ "williamboman/mason-lspconfig.nvim" }, -- Optional |
||||||
|
|
||||||
|
-- Autocompletion |
||||||
|
{ "hrsh7th/nvim-cmp" }, -- Required |
||||||
|
{ "hrsh7th/cmp-nvim-lsp" }, -- Required |
||||||
|
{ "L3MON4D3/LuaSnip" }, -- Required |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
-- Misc |
||||||
|
-- use "vimsence/vimsence" |
||||||
|
use "andweeb/presence.nvim" |
||||||
|
use { |
||||||
|
'nvim-lualine/lualine.nvim', |
||||||
|
requires = { 'nvim-tree/nvim-web-devicons', opt = true } |
||||||
|
} |
||||||
|
|
||||||
|
use { |
||||||
|
"folke/todo-comments.nvim", |
||||||
|
requires = "nvim-lua/plenary.nvim", |
||||||
|
config = function() |
||||||
|
require("todo-comments").setup({}) |
||||||
|
end |
||||||
|
} |
||||||
|
end) |
@ -0,0 +1,21 @@ |
|||||||
|
vim.g.mapleader = " " |
||||||
|
|
||||||
|
-- Generic binds |
||||||
|
vim.keymap.set("n", "<leader>f", vim.cmd.Ex) |
||||||
|
|
||||||
|
-- Telescope |
||||||
|
local builtin = require("telescope.builtin") |
||||||
|
vim.keymap.set("n", "<A-f>", builtin.find_files, {}) |
||||||
|
-- vim.keymap.set("n", "<A-g>", builtin.live_grep, {}) |
||||||
|
vim.keymap.set("n", "<A-b>", builtin.buffers, {}) |
||||||
|
vim.keymap.set("n", "<A-h>", builtin.help_tags, {}) |
||||||
|
|
||||||
|
-- Editor binds |
||||||
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") |
||||||
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") |
||||||
|
|
||||||
|
-- Copy/paste stuff |
||||||
|
vim.keymap.set("n", "<leader>y", "\"+y") |
||||||
|
vim.keymap.set("v", "<leader>y", "\"+y") |
||||||
|
vim.keymap.set("n", "<leader>Y", "\"+Y") |
||||||
|
|
@ -0,0 +1,195 @@ |
|||||||
|
-- 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/elal/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/elal/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/elal/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/elal/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" |
||||||
|
local install_cpath_pattern = "/home/elal/.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 = { |
||||||
|
["Comment.nvim"] = { |
||||||
|
config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" }, |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/Comment.nvim", |
||||||
|
url = "https://github.com/numToStr/Comment.nvim" |
||||||
|
}, |
||||||
|
LuaSnip = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/LuaSnip", |
||||||
|
url = "https://github.com/L3MON4D3/LuaSnip" |
||||||
|
}, |
||||||
|
["base16-vim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/base16-vim", |
||||||
|
url = "https://github.com/chriskempson/base16-vim" |
||||||
|
}, |
||||||
|
["cmp-nvim-lsp"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", |
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp" |
||||||
|
}, |
||||||
|
["lsp-zero.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", |
||||||
|
url = "https://github.com/VonHeikemen/lsp-zero.nvim" |
||||||
|
}, |
||||||
|
["lualine.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/lualine.nvim", |
||||||
|
url = "https://github.com/nvim-lualine/lualine.nvim" |
||||||
|
}, |
||||||
|
["mason-lspconfig.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", |
||||||
|
url = "https://github.com/williamboman/mason-lspconfig.nvim" |
||||||
|
}, |
||||||
|
["mason.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/mason.nvim", |
||||||
|
url = "https://github.com/williamboman/mason.nvim" |
||||||
|
}, |
||||||
|
["melange-nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/melange-nvim", |
||||||
|
url = "https://github.com/savq/melange-nvim" |
||||||
|
}, |
||||||
|
["nvim-cmp"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/nvim-cmp", |
||||||
|
url = "https://github.com/hrsh7th/nvim-cmp" |
||||||
|
}, |
||||||
|
["nvim-lspconfig"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", |
||||||
|
url = "https://github.com/neovim/nvim-lspconfig" |
||||||
|
}, |
||||||
|
["nvim-treesitter"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/nvim-treesitter", |
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter" |
||||||
|
}, |
||||||
|
["nvim-web-devicons"] = { |
||||||
|
loaded = false, |
||||||
|
needs_bufread = false, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", |
||||||
|
url = "https://github.com/nvim-tree/nvim-web-devicons" |
||||||
|
}, |
||||||
|
["packer.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/packer.nvim", |
||||||
|
url = "https://github.com/wbthomason/packer.nvim" |
||||||
|
}, |
||||||
|
["plenary.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/plenary.nvim", |
||||||
|
url = "https://github.com/nvim-lua/plenary.nvim" |
||||||
|
}, |
||||||
|
["presence.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/presence.nvim", |
||||||
|
url = "https://github.com/andweeb/presence.nvim" |
||||||
|
}, |
||||||
|
["telescope.nvim"] = { |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/telescope.nvim", |
||||||
|
url = "https://github.com/nvim-telescope/telescope.nvim" |
||||||
|
}, |
||||||
|
["todo-comments.nvim"] = { |
||||||
|
config = { "\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0" }, |
||||||
|
loaded = true, |
||||||
|
path = "/home/elal/.local/share/nvim/site/pack/packer/start/todo-comments.nvim", |
||||||
|
url = "https://github.com/folke/todo-comments.nvim" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
time([[Defining packer_plugins]], false) |
||||||
|
-- Config for: todo-comments.nvim |
||||||
|
time([[Config for todo-comments.nvim]], true) |
||||||
|
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0", "config", "todo-comments.nvim") |
||||||
|
time([[Config for todo-comments.nvim]], false) |
||||||
|
-- Config for: Comment.nvim |
||||||
|
time([[Config for Comment.nvim]], true) |
||||||
|
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim") |
||||||
|
time([[Config for Comment.nvim]], 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 |
Loading…
Reference in new issue