nvim + some stuff I forgot to commit

New nvim config (dumpster fire)
`less` color fixes
prompt hostname fix
add blugon
This commit is contained in:
Thomas Muller 2024-06-08 10:06:39 -04:00
parent f180da3278
commit 4b8c565254
4 changed files with 122 additions and 23 deletions

View file

@ -1,12 +1,12 @@
# ----[less/man colors]---- # ----[less/man colors]----
set -gx LESS '-R' set -gx LESS '-R'
set -gx LESS_TERMCAP_mb '\e\[1\;31m' # begin blink #set -gx LESS_TERMCAP_mb '\E[1;31m' # begin blink
set -gx LESS_TERMCAP_md '\e\[1\;36m' # begin bold #set -gx LESS_TERMCAP_md '\E[1;36m' # begin bold
set -gx LESS_TERMCAP_me '\e\[0m' # reset bold/blink #set -gx LESS_TERMCAP_me '\E[0m' # reset bold/blink
set -gx LESS_TERMCAP_so '\e\[01\;44\;33m' # begin reverse video #set -gx LESS_TERMCAP_so '\E[01;44;33m' # begin reverse video
set -gx LESS_TERMCAP_se '\e\[0m' # reset reverse video #set -gx LESS_TERMCAP_se '\E[0m' # reset reverse video
set -gx LESS_TERMCAP_us '\e\[1\;32m' # begin underline #set -gx LESS_TERMCAP_us '\E[1;32m' # begin underline
set -gx LESS_TERMCAP_ue '\e\[0m' # reset underline #set -gx LESS_TERMCAP_ue '\E[0m' # reset underline
# ----[ls colors]---- # ----[ls colors]----

View file

@ -1,6 +1,6 @@
function noname function noname
if set -q SSH_CONNECTION if set -q SSH_CONNECTION
echo -sn (whoami)'@'(hostname)' ' echo -sn (whoami)'@'(hostnamectl hostname)' '
else else
echo '' echo ''
end end

View file

@ -21,6 +21,7 @@ font pango:mono 10
exec --no-startup-id xcompmgr exec --no-startup-id xcompmgr
exec --no-startup-id sxhkd exec --no-startup-id sxhkd
exec --no-startup-id dunst exec --no-startup-id dunst
exec --no-startup-id blugon
exec --no-startup-id gnome-keyring-daemon exec --no-startup-id gnome-keyring-daemon
exec --no-startup-id lxqt-policykit-agent exec --no-startup-id lxqt-policykit-agent
exec_always keepassxc exec_always keepassxc

View file

@ -1,41 +1,141 @@
set nocompatible set nocompatible
filetype off filetype off
colorscheme torte
let mapleader = " "
" ----[Plugins]---- " ----[Plugins]----
call plug#begin() call plug#begin()
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} " Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'} " Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}
Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'} " Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'}
Plug 'neovim/nvim-lspconfig' " Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/nvim-lsp-installer' " Plug 'williamboman/nvim-lsp-installer'
Plug 'preservim/nerdtree' Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tikhomirov/vim-glsl' Plug 'tikhomirov/vim-glsl'
Plug 'powerman/vim-plugin-AnsiEsc'
Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'L3MON4D3/LuaSnip'
Plug 'VonHeikemen/lsp-zero.nvim', {'branch': 'v3.x'}
Plug '~/.config/nvim/plugins/qt-uic'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.6' }
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-treesitter/nvim-treesitter-context'
Plug 'mbbill/undotree'
Plug 'tpope/vim-fugitive'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' }
call plug#end() call plug#end()
" ----[COQ]---- " ----[COQ]----
let g:coq_settings = {'auto_start': 'shut-up', 'display.pum.fast_close': v:false} " let g:coq_settings = {'auto_start': 'shut-up', 'display.pum.fast_close': v:false}
" ----[NVim LSPConfig]---- " ----[NVim LSPConfig]----
lua << EOF lua << EOF
local lsp = require 'lspconfig' local lsp = require 'lspconfig'
local coq = require 'coq' local qt_uic = require 'qt_uic'
-- local coq = require 'coq'
-- lsp.cmake.setup{}
-- lsp.pyright.setup{}
-- lsp.clangd.setup{coq.lsp_ensure_capabilities{}}
-- lsp.cmake.setup{coq.lsp_ensure_capabilities{}}
-- lsp.pyright.setup{coq.lsp_ensure_capabilities{}}
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
end)
vim.diagnostic.config({
virtual_text = false
})
-- to learn how to use mason.nvim with lsp-zero
-- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md
require('mason').setup({})
require('mason-lspconfig').setup({
handlers = {
function(server_name)
require('lspconfig')[server_name].setup({})
end,
}
})
lsp.clangd.setup{} lsp.clangd.setup{}
lsp.cmake.setup{} lsp.cmake.setup{}
lsp.pyright.setup{} lsp.pyright.setup{}
lsp.clangd.setup{coq.lsp_ensure_capabilities{}} -- lsp.clangd.setup{coq.lsp_ensure_capabilities{}}
lsp.cmake.setup{coq.lsp_ensure_capabilities{}} -- lsp.cmake.setup{coq.lsp_ensure_capabilities{}}
lsp.pyright.setup{coq.lsp_ensure_capabilities{}} -- lsp.pyright.setup{coq.lsp_ensure_capabilities{}}
lsp.pyright.setup{qt_uic.extend_lsp_completion{}}
require("nvim-treesitter.configs").setup({
-- A list of parser names, or "all"
ensure_installed = {
"vimdoc", "c", "cpp", "bash", "python",
},
-- 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 = {
-- `false` will disable the whole extension
enable = true,
-- 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,
},
})
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float) vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next) vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist) vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation)
--vim.keymap.set('n', '<leader>e', vim.lsp.diagnostic.show_line_diagnostics)
vim.keymap.set('n', 'grn', vim.lsp.buf.rename)
vim.keymap.set('n', 'gra', vim.lsp.buf.code_action)
vim.keymap.set('n', 'grr', vim.lsp.buf.references)
vim.keymap.set('i', '^S', vim.lsp.buf.signature_help)
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
vim.keymap.set('n', '<leader>gs', vim.cmd.Git)
vim.opt.scrolloff = 8
vim.opt.signcolumn = 'yes'
vim.opt.isfname:append('@-@')
EOF EOF
" ----[Look and Feel]---- " ----[Look and Feel]----
@ -80,15 +180,13 @@ nnoremap <tab> :NERDTreeToggle<cr>
" ----[Macros]---- " ----[Macros]----
" Find and replace macro " Find and replace macro
nnoremap S :%s//g<Left><Left> nnoremap S :%s//g<Left><Left>
nnoremap <C-u> <C-u>zz
nnoremap <C-d> <C-d>zz
" Copy paste " Copy paste
vnoremap <C-c> "+y vnoremap <C-c> "+y
map <C-p> "+P map <C-p> "+P
" xnoremap <leader>p "_dP
" Markers
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
map <leader><leader> <Esc>/<++><Enter>"_c4l
" sudo write, TODO: make this not fuck things up " sudo write, TODO: make this not fuck things up
" command W :execute ':silent w !sudo tee % > /dev/null' | :edit! " command W :execute ':silent w !sudo tee % > /dev/null' | :edit!