Compare commits

...

2 Commits

Author SHA1 Message Date
felixm dfb75e565f Clean up nvim configuration and minor changes 2023-08-11 14:01:31 -04:00
felixm be5312ecb4 Update progs 2023-07-26 19:50:57 -04:00
14 changed files with 100 additions and 38 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
vim/plugged
bin
__pycache__
.stversions

View File

@ -1,32 +1,30 @@
require('gpt')
require('mappings')
require('config_lualine')
require('config_mappings')
require('config_telescope')
require('config_treesitter')
require('plugin_gpt')
require('plugin_votion')
require('plugins')
require('telescope_config')
require('lualine_config')
require('votion')
-- Misc commands similar to my vimrc
-- Global options
vim.g.mapleader = ","
vim.g.markdown_folding = 1
-- Options to make it similar to vimrc
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.smarttab = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.api.nvim_set_keymap('i', 'jk', '<Esc>', {noremap = true})
vim.cmd.colorscheme "catppuccin-frappe"
vim.g.markdown_folding = 1
vim.opt.title = true
vim.opt.titlestring="nvim %f"
-- treesitter setup
require('nvim-treesitter.configs').setup {
ensure_installed = {"python", "lua", "rust"}, -- Install these parsers
highlight = {
enable = true, -- Enable syntax highlighting
},
textobjects = {
enable = true
}
}
vim.cmd.colorscheme "catppuccin-frappe"
vim.api.nvim_set_keymap('i', 'jk', '<Esc>', {noremap = true})
local lspconfig = require('lspconfig')
lspconfig.pyright.setup{}
lspconfig.marksman.setup{}
lspconfig.rust_analyzer.setup{}
require'lspconfig'.pyright.setup{}

View File

@ -18,7 +18,7 @@ wk.register({
wk.register({
b = {
name = "buffer",
q = { "<cmd>bdelete<cr>", "Quit" },
q = { "<cmd>enew | bd #<CR>", "Quit" },
n = { "<cmd>bnext<cr>", "Next" },
p = { "<cmd>bprevious<cr>", "Prev" },
a = { "<cmd>unhide<cr>", "Show All" },
@ -63,3 +63,34 @@ wk.register({
d = { "<cmd>VotionDelete<cr>", "Delete" },
},
}, { prefix = "<leader>" })
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
require("which-key").register({
l = {
name = "LSP",
D = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "Go to declaration" },
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "Go to definition" },
K = { "<cmd>lua vim.lsp.buf.hover()<CR>", "Show hover" },
i = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "Go to implementation" },
k = { "<cmd>lua vim.lsp.buf.signature_help()<CR>", "Show signature help" },
-- a = { "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", "Add workspace folder" },
-- r = { "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", "Remove workspace folder" },
-- l = { "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", "List workspace folders" },
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "Go to type definition" },
r = { "<cmd>lua vim.lsp.buf.rename()<CR>", "Rename" },
c = { "<cmd>lua vim.lsp.buf.code_action()<CR>", "Code action" },
r = { "<cmd>lua vim.lsp.buf.references()<CR>", "Show references" },
f = { "<cmd>lua vim.diagnostic.open_float()<CR>", "Diagnostics float" },
p = { "<cmd>lua vim.diagnostic.goto_prev()<CR>", "Go to prev error" },
n = { "<cmd>lua vim.diagnostic.goto_next()<CR>", "Go to next error" },
l = { "<cmd>lua vim.diagnostic.setloclist()<CR>", "Set location list" },
},
}, { prefix = "<leader>" })
end,
})

View File

@ -0,0 +1,13 @@
require('nvim-treesitter.configs').setup {
ensure_installed = {"python", "lua", "rust", "markdown", "c"}, -- Install these parsers
highlight = {
enable = true,
additional_vim_regex_highlighting = false
},
textobjects = {
enable = true
},
indent = {
enable = true
}
}

View File

@ -2,7 +2,7 @@
-- the root location of the votion database all MD files in this directory
-- and it's subdirectories are part of the database.
-- Set votion_directory
local votion_directory = vim.fn.expand("~") .. "/owc/vault"
local votion_directory = vim.fn.expand("~") .. "/owc"
local actions = require("telescope.actions")
function votion_new()

View File

@ -1,7 +1,11 @@
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use "wbthomason/packer.nvim"
use 'nvim-tree/nvim-web-devicons'
use 'hoob3rt/lualine.nvim'
use 'neovim/nvim-lspconfig'
use { 'nvim-treesitter/nvim-treesitter' }
use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }
use { "nvim-treesitter/nvim-treesitter-textobjects" }
use { "catppuccin/nvim", name = "catppuccin" }
use {
@ -16,14 +20,10 @@ return require('packer').startup(function(use)
vim.o.timeoutlen = 300
end
}
use {
'stevearc/oil.nvim',
config = function() require('oil').setup() end
}
use 'nvim-tree/nvim-web-devicons'
use 'hoob3rt/lualine.nvim'
use 'neovim/nvim-lspconfig'
end)

View File

@ -74,16 +74,31 @@ end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["lualine.nvim"] = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/hoob3rt/lualine.nvim"
},
nvim = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim",
url = "https://github.com/catppuccin/nvim"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-treesitter-textobjects"] = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",

View File

@ -38,13 +38,13 @@ def window_tabs():
length_per_title = 90 // len(titles)
for i in range(len(titles)):
titles[i] = titles[i].replace("— Mozilla Firefox", "")
titles[i] = titles[i].replace("- Chromium", "")
titles[i] = titles[i].replace("&", "")
titles[i] = titles[i][:length_per_title]
# Show selected text with color 'colors.TEXT'
if selected_index != -1:
titles[
selected_index
] = f'<span foreground="{TEXT}">{titles[selected_index]}</span>'
titles[selected_index] = f'<span foreground="{TEXT}">{titles[selected_index]}</span>'
text = " | ".join(titles)
return text

View File

@ -91,6 +91,5 @@
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.startupEditor": "none",
"window.menuBarVisibility": "toggle"
"workbench.startupEditor": "none"
}

View File

@ -26,9 +26,8 @@ alias private-session='export SAVEHIST=0 && export HISTSIZE=0'
alias icat="kitty +kitten icat"
# votion
alias vt="vim -c RgVotionTitle"
alias vn="vim -c \":call votion#votion#Note()\""
alias vj="vim -c \":call votion#votion#Journal()\""
alias vt="nvim -c VotionOpen"
alias vj="daily-journal"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"

View File

@ -1,5 +1,7 @@
,alacritty,"nice terminal emulator."
,acpi,"is a client for battery, power, and thermal readings."
,alsa-utils,"for audio tools."
,arandr,"allows the user to customize monitor arrangements."
,base-devel,"includes basic system tools."
,bat,"can highlight code output and display files."
,brightnessctl,"adjust screen brightness."
,calibre,"for nice ebook reading."
@ -12,9 +14,11 @@
,fzf,"is a fuzzy finder tool."
,gnome-keyring,"serves as the system keyring."
,i3lock,"allows you to lock your computer, and quickly unlock with your password."
,inetutils,"includes hostname which our zshrc needs."
,keepassxc,"is a password manager."
,kitty,"other nice terminal emulator."
,man-db,"lets you read man pages of programs."
,marksman,"is a markdown language server."
,mediainfo,"shows audio and video information."
,moreutils,"is a collection of useful unix tools."
,mpv,"is the patrician's choice video player."
@ -22,6 +26,7 @@
,noto-fonts-emoji,"is an emoji font."
,ntp,"for time synchronization."
,pacman,"clearly our package manager."
,pacman-contrib,"additional stuff for pacman."
,pasystray,"provides a system tray for volume control."
,pipewire,"is the audio system."
,pipewire-pulse,"gives pipewire compatibility with PulseAudio programs."
@ -31,6 +36,7 @@
,qtile,"is the window manager I use nowadays."
,rigrep,"is an ultra fast version of grep written in Rust."
,rofi,"is a launcher that sucks more than dmenu."
,rofi-emoji,"because emojis make life prettier."
,ttf-jetbrains-mono-nerd,"for some nice font symbols."
,unclutter,"hides an inactive mouse."
,unzip,"unzips zips."

1 alacritty acpi nice terminal emulator. is a client for battery, power, and thermal readings.
2 alsa-utils for audio tools.
3 arandr arandr allows the user to customize monitor arrangements. allows the user to customize monitor arrangements.
4 base-devel includes basic system tools.
5 bat bat can highlight code output and display files. can highlight code output and display files.
6 brightnessctl brightnessctl adjust screen brightness. adjust screen brightness.
7 calibre calibre for nice ebook reading. for nice ebook reading.
14 fzf fzf is a fuzzy finder tool. is a fuzzy finder tool.
15 gnome-keyring gnome-keyring serves as the system keyring. serves as the system keyring.
16 i3lock i3lock allows you to lock your computer, and quickly unlock with your password. allows you to lock your computer, and quickly unlock with your password.
17 inetutils includes hostname which our zshrc needs.
18 keepassxc keepassxc is a password manager. is a password manager.
19 kitty kitty other nice terminal emulator. other nice terminal emulator.
20 man-db man-db lets you read man pages of programs. lets you read man pages of programs.
21 marksman is a markdown language server.
22 mediainfo mediainfo shows audio and video information. shows audio and video information.
23 moreutils moreutils is a collection of useful unix tools. is a collection of useful unix tools.
24 mpv mpv is the patrician's choice video player. is the patrician's choice video player.
26 noto-fonts-emoji noto-fonts-emoji is an emoji font. is an emoji font.
27 ntp ntp for time synchronization. for time synchronization.
28 pacman pacman clearly our package manager. clearly our package manager.
29 pacman-contrib additional stuff for pacman.
30 pasystray pasystray provides a system tray for volume control. provides a system tray for volume control.
31 pipewire pipewire is the audio system. is the audio system.
32 pipewire-pulse pipewire-pulse gives pipewire compatibility with PulseAudio programs. gives pipewire compatibility with PulseAudio programs.
36 qtile qtile is the window manager I use nowadays. is the window manager I use nowadays.
37 rigrep rigrep is an ultra fast version of grep written in Rust. is an ultra fast version of grep written in Rust.
38 rofi rofi is a launcher that sucks more than dmenu. is a launcher that sucks more than dmenu.
39 rofi-emoji because emojis make life prettier.
40 ttf-jetbrains-mono-nerd ttf-jetbrains-mono-nerd for some nice font symbols. for some nice font symbols.
41 unclutter unclutter hides an inactive mouse. hides an inactive mouse.
42 unzip unzip unzips zips. unzips zips.