First commit--basic nvim/kitty config

This commit is contained in:
Julien Negrotto 2025-05-19 17:12:15 -05:00
commit 79b13c038f
90 changed files with 3355 additions and 0 deletions

4
Brewfile Normal file
View File

@ -0,0 +1,4 @@
# LSP Servers
brew "ruby-lsp"
brew "lua-language-server"
brew "typescript-language-server"

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# My Dotfiles
## External Dependencies
- Neovim
- Kitty
- Homebrew
## Installation
Assuming external dependencies are installed, run `./install.sh`.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

110
fonts/Iosevka/LICENSE.md Normal file
View File

@ -0,0 +1,110 @@
Copyright (c) 2015-2023, Renzhi Li (aka. Belleve Invis, belleve@typeof.net)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
--------------------------
SIL Open Font License v1.1
====================================================
Preamble
----------
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
Definitions
-------------
`"Font Software"` refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
`"Reserved Font Name"` refers to any names specified as such after the
copyright statement(s).
`"Original Version"` refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
`"Modified Version"` refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
`"Author"` refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
Permission & Conditions
------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1. Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2. Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3. No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5. The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
Termination
-----------
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

48
fonts/Iosevka/README.md Normal file
View File

@ -0,0 +1,48 @@
# Nerd Fonts
This is an archived font from the Nerd Fonts release v3.1.1.
For more information see:
* https://github.com/ryanoasis/nerd-fonts/
* https://github.com/ryanoasis/nerd-fonts/releases/latest/
# Iosevka
**Iosevka** is an *open-source*, *sans-serif* + *slab-serif*, *monospace* + *quasiproportional* typeface family, designed for *writing code*, using in *terminals*, and preparing *technical documents*.
For more information have a look at the upstream website: https://github.com/be5invis/Iosevka
Version: 22.1.0
## Which font?
### TL;DR
* Pick your font family:
* If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`).
* If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv.
* If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`).
### Ligatures
Ligatures are generally preserved in the patched fonts.
Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`.
If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings.
### Explanation
Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:
#### `Option 1: Download already patched font`
* For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases)
* Or download the development version from the folders here
#### `Option 2: Patch your own font`
* Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size)
For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)
[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a

15
install.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
echo "Installing fonts"
sudo cp -R fonts/* /usr/share/fonts
fc-cache
echo "Installing homebrew dependencies"
brew bundle install
echo "Creating symlinks"
ln -sf "$PWD/nvim" "${XDG_CONFIG_HOME:-$HOME/.config}/nvim"
ln -sf "$PWD/kitty" "${XDG_CONFIG_HOME:-$HOME/.config}/kitty"
echo "Done"

1
kitty/kitty Symbolic link
View File

@ -0,0 +1 @@
/home/julien/Code/dotfiles/kitty

2785
kitty/kitty.conf Normal file

File diff suppressed because it is too large Load Diff

380
nvim/init.lua Normal file
View File

@ -0,0 +1,380 @@
-- vim: fdm=marker
--[[
# My Neovim configuration
The basic settings were adapted from kickstart.nvim's init.lua[^1].
[^1]: https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua
--]]
-- Disable netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Use <space> as the leader key (must be done before loading plugins)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
--{{{ Options
-- Indent with two spaces by default
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.expandtab = true
-- Enable hybrid line numbers (current line absolute, others relative)
vim.o.number = true
vim.o.relativenumber = true
-- Enable mouse mode (I don't normally use it, but can't hurt)
vim.o.mouse = 'a'
-- Indent wrapped lines to the same level as the parent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Use smart case for search (insensitive unless \C or capital letters present)
vim.o.ignorecase = true
vim.o.smartcase = true
-- Always display the signcolumn
vim.o.signcolumn = 'yes'
-- Lower update time
vim.o.updatetime = 250
-- Lower timeout for key sequences
vim.o.timeoutlen = 300
-- Configure how new splits should be opened
vim.o.splitright = true -- Left/right splits open to right of current
vim.o.splitbelow = true -- Up/down splits open below current
-- Display certain whitespace characters
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- Preview substitutions live, while typing
vim.o.inccommand = 'split'
-- Highlight the current line
vim.o.cursorline = true
-- Minimal number of context lines to keep on screen
vim.o.scrolloff = 15
-- Get confirmation for certain operations instead of failing
vim.o.confirm = true
--}}}
--{{{ Keymaps
-- Use <C-[hjkl]> to navigate between splits
vim.keymap.set('n', '<c-h>', '<c-w>h')
vim.keymap.set('n', '<c-j>', '<c-w>j')
vim.keymap.set('n', '<c-k>', '<c-w>k')
vim.keymap.set('n', '<c-l>', '<c-w>l')
-- Use <leader>-[y|p] to yank to or put from the system clipboard
vim.keymap.set('n', '<leader>y', '"+y', { desc = 'Yank to system clipboard' })
vim.keymap.set('n', '<leader>p', '"+p', { desc = 'Put from system clipboard' })
-- Use <esc> or <C-c> to clear search highlights
vim.keymap.set('n', '<esc>', '<cmd>nohlsearch<cr>', { desc = 'Clear search highlights' })
-- Quickfix list
vim.keymap.set('n', '<leader>co', '<cmd>copen<cr>', { desc = 'Open quickfix list' })
vim.keymap.set('n', '<leader>cc', '<cmd>cclose<cr>', { desc = 'Close quickfix list' })
-- Location list
vim.keymap.set('n', '<leader>ls', vim.diagnostic.setloclist, { desc = 'Set (populate) location list' })
vim.keymap.set('n', '<leader>lo', '<cmd>lopen<cr>', { desc = 'Open location list' })
vim.keymap.set('n', '<leader>lc', '<cmd>lclose<cr>', { desc = 'Close location list' })
-- Exit terminal mode; use <c-\><c-n> if not
vim.keymap.set('t', '<esc><esc>', '<c-\\><c-n>', { desc = 'Exit terminal mode' })
--}}}
--{{{ Autocommands
-- Highlight when yanking (copying) text
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking text',
group = vim.api.nvim_create_augroup('grillades-highlight-yank', { clear = true }),
callback = function()
vim.hl.on_yank()
end,
})
--}}}
--{{{ Plugins (lazy.nvim)
-- Bootstrap lazy.nvim
-- This will return something like $XDG_DATA_HOME/lazy/lazy.nvim or equivalent
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
{ '\nPress any key to exit...' },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Configure lazy.nvim
require('lazy').setup({
spec = {
{
'folke/tokyonight.nvim',
lazy = false,
priority = 1000,
config = function()
vim.cmd 'colorscheme tokyonight-night'
end
},
{ 'tpope/vim-surround' },
{ 'justinmk/vim-sneak' },
{ 'tpope/vim-repeat' },
{ 'tpope/vim-commentary' },
{
'nvim-telescope/telescope.nvim', tag = '0.1.8',
dependencies = {
'nvim-lua/plenary.nvim',
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make',
cond = function() return vim.fn.executable('make') == 1 end,
},
},
config = function()
local telescope = require('telescope')
local builtin = require('telescope.builtin')
telescope.setup({
defaults = {
layout_config = { prompt_position = 'top' },
sorting_strategy = 'ascending',
},
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
},
},
})
pcall(telescope.load_extension, 'fzf')
-- Keymaps
vim.keymap.set('n', '<leader>f', builtin.find_files, { desc = 'Find files' })
vim.keymap.set('n', '<leader>s', builtin.live_grep, { desc = 'Search files' })
vim.keymap.set('n', '<leader>b', builtin.buffers, { desc = 'Find buffer' })
vim.keymap.set('n', '<leader>h', builtin.help_tags, { desc = 'Search help' })
end,
},
{
'nvim-tree/nvim-tree.lua',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('nvim-tree').setup({
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = {
enable = true,
update_root = true,
},
view = { width = 30 },
filters = { dotfiles = false },
git = { enable = true },
actions = {
open_file = { quit_on_open = true },
},
})
vim.keymap.set('n', '<leader>e', '<cmd>NvimTreeToggle<cr>', { desc = 'Toggle file explorer' })
end,
},
{
'nvim-treesitter/nvim-treesitter',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
'nvim-treesitter/nvim-treesitter-context',
},
build = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = { 'lua', 'vim', 'ruby', 'bash', 'html', 'javascript' },
highlight = { enable = true },
indent = { enable = true },
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
['ab'] = '@block.outer',
['ib'] = '@block.inner',
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
[']f'] = '@function.outer',
[']c'] = '@class.outer',
[']b'] = '@block.outer',
},
goto_previous_start = {
['[f'] = '@function.outer',
['[c'] = '@class.outer',
['[b'] = '@block.outer',
},
},
},
})
end,
},
{
'neovim/nvim-lspconfig',
config = function()
local lspconfig = require('lspconfig')
-- Ruby
lspconfig.ruby_lsp.setup({})
-- Lua
lspconfig.lua_ls.setup({
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
})
-- JavaScript/TypeScript
lspconfig.ts_ls.setup({})
end,
},
{ 'lewis6991/gitsigns.nvim' },
{
'ahmedkhalf/project.nvim',
config = function()
local project_nvim = require('project_nvim')
project_nvim.setup({})
local telescope = require('telescope')
telescope.load_extension('projects')
vim.keymap.set('n', '<leader>q', telescope.extensions.projects.projects, { desc = 'Find files' })
end,
},
{
'hrsh7th/nvim-cmp',
dependencies = {
'hrsh7th/cmp-vsnip',
'hrsh7th/vim-vsnip',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
},
config = function()
local cmp = require('cmp')
cmp.setup({
snippet = {
expand = function(args)
vim.fn['vsnip#anonymous'](args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
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 = 'vsnip' },
}, {
{ name = 'buffer' },
}),
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
end,
},
{
"folke/trouble.nvim",
opts = {},
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
},
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons", opt = true },
config = function()
local lualine = require("lualine")
lualine.setup({})
end,
},
},
install = {
-- Install missing plugins on startup
missing = true,
},
})
--}}}

1
nvim/nvim Symbolic link
View File

@ -0,0 +1 @@
/home/julien/Code/dotfiles/nvim