diff options
author | Joe <rrbo@proton.me> | 2023-09-22 11:20:53 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-09-22 11:20:53 +0200 |
commit | e25677cbebfa2a9e4705de3d47610cd2026d0b56 (patch) | |
tree | 924f5cda37599a221acddaa868a8f224627f6eee /.config/nvim/lua | |
parent | up (diff) | |
download | dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.gz dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.bz2 dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.xz dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.zst dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.zip |
up
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/plugs-config/asyncomplete.lua | 13 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/floaterm.lua | 9 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/lualine.lua | 349 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/nerd-commenter.lua | 14 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/org.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/quickscope.lua | 7 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/rainbow.lua | 23 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/signify.lua | 1 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/startify.lua | 29 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/treesitter.lua | 34 | ||||
-rw-r--r-- | .config/nvim/lua/plugs-config/whichkey.lua | 43 |
11 files changed, 0 insertions, 526 deletions
diff --git a/.config/nvim/lua/plugs-config/asyncomplete.lua b/.config/nvim/lua/plugs-config/asyncomplete.lua deleted file mode 100644 index da28c37..0000000 --- a/.config/nvim/lua/plugs-config/asyncomplete.lua +++ /dev/null @@ -1,13 +0,0 @@ -vim.cmd [[ -autocmd User asyncomplete_setup call asyncomplete#register_source( - \ asyncomplete#sources#clang#get_source_options({ - \ 'config': { - \ 'clang_path': '/usr/bin/cc', - \ 'clang_args': { - \ 'default': ['-I/usr/include'], - \ 'c': ['-std=c89', '-I/usr/include'], - \ 'cpp': ['-std=c++98', '-I/usr/include'] - \ } - \ } - \ })) -]] diff --git a/.config/nvim/lua/plugs-config/floaterm.lua b/.config/nvim/lua/plugs-config/floaterm.lua deleted file mode 100644 index 7f80d65..0000000 --- a/.config/nvim/lua/plugs-config/floaterm.lua +++ /dev/null @@ -1,9 +0,0 @@ -vim.g.floaterm_autoinsert = 1 -vim.g.floaterm_width = 0.6 -vim.g.floaterm_height = 0.45 -vim.g.floaterm_wintitle = 0 -vim.g.floaterm_autoclose = 1 -vim.g.floaterm_position = 'bottom' -vim.g.floaterm_gitcommit = 'split' -vim.g.floaterm_wintype = 'floating' -vim.g.floaterm_rootmarkers = { '.project', '.git', '.hg', '.svn', '.root', '.gitignore', '.fslckout', '.fossil-settings' } diff --git a/.config/nvim/lua/plugs-config/lualine.lua b/.config/nvim/lua/plugs-config/lualine.lua deleted file mode 100644 index f3d2fe7..0000000 --- a/.config/nvim/lua/plugs-config/lualine.lua +++ /dev/null @@ -1,349 +0,0 @@ --- Eviline config for lualine --- Author: shadmansaleh --- Credit: glepnir -local lualine = require('lualine') - --- Color table for highlights --- stylua: ignore -local colors = { - bg = '#202328', - fg = '#bbc2cf', - yellow = '#ECBE7B', - cyan = '#008080', - darkblue = '#081633', - green = '#98be65', - orange = '#FF8800', - violet = '#a9a1e1', - magenta = '#c678dd', - blue = '#51afef', - red = '#ec5f67', -} - -local conditions = { - buffer_not_empty = function() - return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 - end, - hide_in_width = function() - return vim.fn.winwidth(0) > 80 - end, - check_git_workspace = function() - local filepath = vim.fn.expand('%:p:h') - local gitdir = vim.fn.finddir('.git', filepath .. ';') - return gitdir and #gitdir > 0 and #gitdir < #filepath - end, -} - --- Config -local config = { - options = { - -- Disable sections and component separators - component_separators = '', - section_separators = '', - theme = { - -- We are going to use lualine_c an lualine_x as left and - -- right section. Both are highlighted by c theme . So we - -- are just setting default looks o statusline - normal = { c = { fg = colors.fg, bg = colors.bg } }, - inactive = { c = { fg = colors.fg, bg = colors.bg } }, - }, - }, - sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_b = {}, - lualine_y = {}, - lualine_z = {}, - -- These will be filled later - lualine_c = {}, - lualine_x = {}, - }, - inactive_sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_b = {}, - lualine_y = {}, - lualine_z = {}, - lualine_c = {}, - lualine_x = {}, - }, -} - --- Inserts a component in lualine_c at left section -local function ins_left(component) - table.insert(config.sections.lualine_c, component) -end - --- Inserts a component in lualine_x at right section -local function ins_right(component) - table.insert(config.sections.lualine_x, component) -end - -ins_left { - function() - return '▊' - end, - -- color = { fg = colors.green }, -- Sets highlighting of component - color = function() - -- auto change color according to neovims mode - local mode_color = { - n = colors.green, - i = colors.blue, - v = colors.magenta, - [''] = colors.magenta, - V = colors.magenta, - c = colors.yellow, - no = colors.red, - s = colors.orange, - S = colors.orange, - [''] = colors.orange, - ic = colors.yellow, - R = colors.red, - Rv = colors.violet, - cv = colors.red, - ce = colors.red, - r = colors.cyan, - rm = colors.cyan, - ['r?'] = colors.cyan, - ['!'] = colors.red, - t = colors.red, - } - return { fg = mode_color[vim.fn.mode()] } - end, - padding = { left = 0, right = 1 }, -- We don't need space before this -} - -ins_left { - -- mode component - function() - return '' - end, - color = function() - -- auto change color according to neovims mode - local mode_color = { - n = colors.green, - i = colors.blue, - v = colors.magenta, - [''] = colors.magenta, - V = colors.magenta, - c = colors.yellow, - no = colors.red, - s = colors.orange, - S = colors.orange, - [''] = colors.orange, - ic = colors.yellow, - R = colors.red, - Rv = colors.violet, - cv = colors.red, - ce = colors.red, - r = colors.cyan, - rm = colors.cyan, - ['r?'] = colors.cyan, - ['!'] = colors.red, - t = colors.red, - } - return { fg = mode_color[vim.fn.mode()] } - end, - padding = { right = 1 }, -} - --- ins_left { --- 'filename', --- cond = conditions.buffer_not_empty, --- color = { fg = colors.magenta, gui = 'bold' }, --- } - -ins_left { - 'buffers', - show_filename_only = false, - hide_filename_extension = false, - show_modified_status = true, - icons_enabled = true, - symbols = { - modified = ' ●', -- Text to show when the buffer is modified - alternate_file = '', -- Text to show to identify the alternate file - directory = '', -- Text to show when the buffer is a directory - }, - buffers_color = { - -- Same values as the general color option can be used here. - active = function() - -- auto change color according to neovims mode - local mode_color = { - n = colors.green, - i = colors.blue, - v = colors.magenta, - [''] = colors.magenta, - V = colors.magenta, - c = colors.yellow, - no = colors.red, - s = colors.orange, - S = colors.orange, - [''] = colors.orange, - ic = colors.yellow, - R = colors.red, - Rv = colors.violet, - cv = colors.red, - ce = colors.red, - r = colors.cyan, - rm = colors.cyan, - ['r?'] = colors.cyan, - ['!'] = colors.red, - t = colors.red, - } - return { fg = mode_color[vim.fn.mode()], gui = 'bold' } - end, - }, -} - -ins_left { - 'diagnostics', - sources = { 'nvim_diagnostic' }, - symbols = { error = ' ', warn = ' ', info = ' ' }, - diagnostics_color = { - color_error = { fg = colors.red }, - color_warn = { fg = colors.yellow }, - color_info = { fg = colors.cyan }, - }, -} - --- Insert mid section. You can make any number of sections in neovim :) --- for lualine it's any number greater then 2 --- ins_left { --- function() --- return '%=' --- end, --- } - -ins_right { - 'filetype', - icons_enabled = true, -- I think icons are cool but Eviline doesn't have them. sigh - color = { fg = colors.blue }, -} - -ins_right { - -- Lsp server name . - function() - local msg = 'no lsp' - local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') - local clients = vim.lsp.get_active_clients() - if next(clients) == nil then - -- icon = '' - return - end - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return client.name - end - end - return msg - end, - icon = ' ', - color = { fg = colors.cyan }, -} - -ins_right { - 'branch', - icon = '', - color = { fg = colors.violet, gui = 'bold' }, -} - -ins_right { - -- filesize component - 'filesize', - cond = conditions.buffer_not_empty, -} - -ins_right { - 'diff', - -- Is it me or the symbol for modified us really weird - symbols = { added = ' ', modified = ' ', removed = ' ' }, - diff_color = { - added = { fg = colors.green }, - modified = { fg = colors.orange }, - removed = { fg = colors.red }, - }, - cond = conditions.hide_in_width, -} - -ins_right { 'location' } - -ins_right { - function() - return '▊' - end, - -- color = { fg = colors.green }, - color = function() - -- auto change color according to neovims mode - local mode_color = { - n = colors.green, - i = colors.blue, - v = colors.magenta, - [''] = colors.magenta, - V = colors.magenta, - c = colors.yellow, - no = colors.red, - s = colors.orange, - S = colors.orange, - [''] = colors.orange, - ic = colors.yellow, - R = colors.red, - Rv = colors.violet, - cv = colors.red, - ce = colors.red, - r = colors.cyan, - rm = colors.cyan, - ['r?'] = colors.cyan, - ['!'] = colors.red, - t = colors.red, - } - return { fg = mode_color[vim.fn.mode()] } - end, - padding = { left = 1 }, -} - --- Now don't forget to initialize lualine -lualine.setup(config) - - - - --- require('lualine').setup { --- options = { --- icons_enabled = true, --- theme = 'gruvbox', --- section_separators = { left = '', right = '' }, --- component_separators = { left = '', right = '' }, --- disabled_filetypes = { --- statusline = {}, --- winbar = {}, --- }, --- ignore_focus = {}, --- always_divide_middle = true, --- globalstatus = false, --- refresh = { --- statusline = 1000, --- tabline = 1000, --- winbar = 1000, --- } --- }, --- sections = { --- lualine_a = { 'mode' }, --- lualine_b = { 'branch', 'diff', 'diagnostics' }, --- lualine_c = { 'filename' }, --- lualine_x = { 'buffers' }, --- lualine_y = { 'filetype' }, --- lualine_z = { 'location' } --- }, --- inactive_sections = { --- lualine_a = {}, --- lualine_b = {}, --- lualine_c = { 'filename' }, --- lualine_x = {}, --- lualine_y = {}, --- lualine_z = {} --- }, --- tabline = {}, --- winbar = {}, --- inactive_winbar = {}, --- extensions = {}, --- } diff --git a/.config/nvim/lua/plugs-config/nerd-commenter.lua b/.config/nvim/lua/plugs-config/nerd-commenter.lua deleted file mode 100644 index ddfadf2..0000000 --- a/.config/nvim/lua/plugs-config/nerd-commenter.lua +++ /dev/null @@ -1,14 +0,0 @@ --- NERD Commenter -vim.g.NERDSpaceDelims = 1 -vim.g.NERDCompactSexyComs = 1 -vim.g.NERDDefaultAlign = 'left' -vim.g.NERDAltDelims_java = 1 -vim.g.NERDCustomDelimiters = { - c = { - left = '/*', - right = '*/', - } -} -vim.g.NERDCommentEmptyLines = 1 -vim.g.NERDTrimTrailingWhitespace = 1 -vim.g.NERDToggleCheckAllLines = 1 diff --git a/.config/nvim/lua/plugs-config/org.lua b/.config/nvim/lua/plugs-config/org.lua deleted file mode 100644 index 662ad08..0000000 --- a/.config/nvim/lua/plugs-config/org.lua +++ /dev/null @@ -1,4 +0,0 @@ --- Org-mode -vim.g.org_todo_keywords = { 'TODO', '|', 'DONE', 'CANCELED' } -vim.g.org_export_emacs = "/usr/bin/emacs" - diff --git a/.config/nvim/lua/plugs-config/quickscope.lua b/.config/nvim/lua/plugs-config/quickscope.lua deleted file mode 100644 index 9fa10fe..0000000 --- a/.config/nvim/lua/plugs-config/quickscope.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Quickscope -vim.g.qs_highlight_on_keys = { 'f', 'F', 't', 'T' } -vim.g.qs_max_chars=150 -vim.cmd [[ -highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline -highlight QuickScopeSecondary guifg='#afff5f' gui=underline ctermfg=81 cterm=underline -]] diff --git a/.config/nvim/lua/plugs-config/rainbow.lua b/.config/nvim/lua/plugs-config/rainbow.lua deleted file mode 100644 index e0951b8..0000000 --- a/.config/nvim/lua/plugs-config/rainbow.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Rainbow --- This module contains a number of default definitions -local rainbow_delimiters = require 'rainbow-delimiters' - -vim.g.rainbow_delimiters = { - strategy = { - [''] = rainbow_delimiters.strategy['global'], - vim = rainbow_delimiters.strategy['local'], - }, - query = { - [''] = 'rainbow-delimiters', - lua = 'rainbow-blocks', - }, - highlight = { - 'RainbowDelimiterOrange', - 'RainbowDelimiterRed', - 'RainbowDelimiterYellow', - 'RainbowDelimiterBlue', - 'RainbowDelimiterGreen', - 'RainbowDelimiterViolet', - 'RainbowDelimiterCyan', - }, -} diff --git a/.config/nvim/lua/plugs-config/signify.lua b/.config/nvim/lua/plugs-config/signify.lua deleted file mode 100644 index a0a0a1d..0000000 --- a/.config/nvim/lua/plugs-config/signify.lua +++ /dev/null @@ -1 +0,0 @@ -vim.g.signify_priority = 9 diff --git a/.config/nvim/lua/plugs-config/startify.lua b/.config/nvim/lua/plugs-config/startify.lua deleted file mode 100644 index a5d3efc..0000000 --- a/.config/nvim/lua/plugs-config/startify.lua +++ /dev/null @@ -1,29 +0,0 @@ --- Startify -vim.cmd [[ -let g:startify_custom_header = startify#pad([ -\ '==========================', -\ '====== ================', -\ '======= =================', -\ '======= =================', -\ '======= ==== ==== ===', -\ '======= === == = ==', -\ '======= === = == ==', -\ '== === === = == =====', -\ '== === === = == = ==', -\ '=== ===== ==== ===', -\ '==========================', -\ ]) -let g:startify_lists = [ - \ { 'type': 'sessions', 'header': startify#pad(['Sessions']) }, - \ { 'type': 'files', 'header': startify#pad(['Recent']) }, - \ { 'type': 'bookmarks', 'header': startify#pad(['Bookmarks']) }, - \ { 'type': 'commands', 'header': startify#pad(['Commands']) }, - \ ] -]] -vim.g.startify_bookmarks = { - { env = '~/.config/env' }, - { v = '~/.config/nvim/init.vim' }, - { zc = '~/.config/zsh/.zshrc' }, - { za = '~/.config/zsh/alias.zsh' }, - { gj = '~/dev/go/gojosh' }, -} diff --git a/.config/nvim/lua/plugs-config/treesitter.lua b/.config/nvim/lua/plugs-config/treesitter.lua deleted file mode 100644 index 62b960b..0000000 --- a/.config/nvim/lua/plugs-config/treesitter.lua +++ /dev/null @@ -1,34 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "query", "go" }, - - -- 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, - - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files - disable = function(lang, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/.config/nvim/lua/plugs-config/whichkey.lua b/.config/nvim/lua/plugs-config/whichkey.lua deleted file mode 100644 index 9529229..0000000 --- a/.config/nvim/lua/plugs-config/whichkey.lua +++ /dev/null @@ -1,43 +0,0 @@ - -local wk = require("which-key") -wk.register({ - b = { ':Buffers<CR>', 'buffers', noremap = true, silent = true }, - c = { name = '+nerd-commenter' }, - d = { ':bd<CR>', 'close buffer', noremap = true, silent = false }, - e = { ':Files<CR>', 'files', noremap = true, silent = true }, - G = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true }, - h = { ':Startify<CR>', 'startify', noremap = true, silent = true }, - k = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false }, - p = { ':<C-u>CocList -A --normal yank<CR>', 'CoC paste', noremap = true, silent = true }, - u = { ':UndotreeShow<CR>', 'undotree', noremap = true, silent = true }, - v = { ':FloatermNew vifm<CR>', 'vifm', noremap = true, silent = true }, - w = { ':w<CR>', 'write buffer', noremap = true, silent = false }, - x = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false }, - q = { name = '+coc-fix-current' }, - r = { name = '+coc-rename' }, - f = { - name = 'telescope', - f = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true }, - }, - g = { - name = 'grep', - a = { ':Ag<CR>', 'the_silver_searcher', noremap = true, silent = true }, - g = { ':Grep<CR>', 'grep', noremap = true, silent = true }, - r = { ':Rg<CR>', 'ripgrep', noremap = true, silent = true }, - }, -}, { prefix = '<leader>', }) -wk.setup({ - plugins = { - presets = { - operators = false, - motions = false, - text_objects = false, - window = false, - nav = false, - z = false, - g = false - }, - }, - triggers = { "<leader>" }, - triggers_nowait = { "d" }, -}) |