Compare commits
6 Commits
5742905cee
...
0a7f70ba74
Author | SHA1 | Date |
---|---|---|
Jordan Orelli | 0a7f70ba74 | 5 months ago |
Jordan Orelli | 8eb6159ae3 | 5 months ago |
Jordan Orelli | 7397673711 | 5 months ago |
Jordan Orelli | d2d49f98dc | 5 months ago |
Jordan Orelli | c3fa15a310 | 5 months ago |
Jordan Orelli | 0ce817f832 | 5 months ago |
@ -0,0 +1 @@
|
||||
print("You are in Python")
|
@ -0,0 +1,15 @@
|
||||
print("Setting up colors")
|
||||
|
||||
rose_pine = packer_plugins["rose-pine"]
|
||||
if rose_pine then
|
||||
print("Rose Pine is known")
|
||||
if rose_pine.loaded then
|
||||
print("Using Rose Pine colorscheme")
|
||||
vim.cmd.colorscheme("rose-pine")
|
||||
-- vim.cmd("colorscheme rose-pine")
|
||||
else
|
||||
print("Rose Pine is not loaded")
|
||||
end
|
||||
else
|
||||
print("Rose Pine is not known")
|
||||
end
|
@ -0,0 +1,47 @@
|
||||
print("Configuring gitsigns")
|
||||
|
||||
local gitsigns = require('gitsigns')
|
||||
|
||||
gitsigns.setup {
|
||||
signs = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
virt_text_priority = 100,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
|
||||
current_line_blame_formatter_opts = {
|
||||
relative_time = false,
|
||||
},
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
}
|
@ -0,0 +1 @@
|
||||
print("LSP setting up")
|
@ -0,0 +1,2 @@
|
||||
print("After Telescope")
|
||||
local builtin = require('telescope.builtin')
|
@ -0,0 +1,19 @@
|
||||
require("nvim-tree").setup({
|
||||
git = { enable = false },
|
||||
renderer = {
|
||||
icons = {
|
||||
show = {
|
||||
folder_arrow = false
|
||||
},
|
||||
glyphs = {
|
||||
default = "⚬",
|
||||
folder = {
|
||||
default = "▸",
|
||||
open = "▾",
|
||||
empty = "▹",
|
||||
empty_open = "▿",
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
@ -0,0 +1,63 @@
|
||||
print("Configuring Treesitter")
|
||||
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"elixir",
|
||||
"go",
|
||||
"graphql",
|
||||
"hcl",
|
||||
"javascript",
|
||||
"lua",
|
||||
"nix",
|
||||
"proto",
|
||||
"python",
|
||||
"query",
|
||||
"ruby",
|
||||
"rust",
|
||||
"toml",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
"zig",
|
||||
},
|
||||
|
||||
-- Install parsers asynchronously
|
||||
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,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
ignore_install = { },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- Disable treesitter on super 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,
|
||||
},
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
print("Init start")
|
||||
|
||||
-- set leader to space
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
|
||||
-- for some reason vim-tree needs this to happen very early on and no I do not
|
||||
-- know why
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
require("plugins")
|
||||
require("prefs")
|
||||
require("keys")
|
@ -0,0 +1,12 @@
|
||||
print("Loading key mappings")
|
||||
|
||||
local telescope = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<C-p>', telescope.find_files, {})
|
||||
|
||||
-- vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
-- vim.keymap.set("v", "K", ":m '>-2<CR>gv=gv")
|
||||
|
||||
-- using J to join lines doesn't move your cursor
|
||||
-- vim.keymap.set("n", "J", "mzJ`z")
|
||||
|
||||
-- vim.keymap.set('n', '<C-k'
|
@ -0,0 +1,86 @@
|
||||
print("Applying Preferences")
|
||||
|
||||
-- The character coding used within vim. I don't remember why I set this, to be
|
||||
-- honest.
|
||||
vim.opt.encoding = "utf-8"
|
||||
|
||||
-- allow backspacing overl ine breaks
|
||||
vim.opt.backspace = "indent,eol,start"
|
||||
|
||||
-- copy indent from current line when starting a new line
|
||||
vim.opt.autoindent = true
|
||||
|
||||
-- automatically add an indent after block-opening symbols like {
|
||||
vim.opt.smartindent = true
|
||||
|
||||
-- tab characters are 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
|
||||
-- indent with 4 spaces when creating automatic indents
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
-- expand tab characters to spaces
|
||||
vim.opt.expandtab = true
|
||||
|
||||
-- configure the characters used to show whitespace characters
|
||||
vim.opt.listchars = {
|
||||
tab = "▸ ",
|
||||
trail = "·",
|
||||
precedes = "←",
|
||||
extends = "→",
|
||||
}
|
||||
|
||||
-- show whitespace characters by default
|
||||
vim.opt.list = true
|
||||
|
||||
-- perform searches incrementally
|
||||
vim.opt.incsearch = true
|
||||
|
||||
-- use case-insensitive searching unless we see a capital
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- highlight recently searched term
|
||||
vim.opt.hlsearch = true
|
||||
|
||||
-- line numbering on
|
||||
vim.opt.nu = true
|
||||
|
||||
-- wrap long lines
|
||||
vim.opt.wrap = true
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undoing"
|
||||
vim.opt.undofile = true
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.opt.scrolloff = 4
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.colorcolumn = "80"
|
||||
|
||||
-- Enable mouse mode
|
||||
vim.opt.mouse = 'a'
|
||||
|
||||
-- do not show the mode, it is in the status line
|
||||
vim.opt.showmode = false
|
||||
|
||||
|
||||
-- use the operating system clipboard for the default yank register
|
||||
-- vim.opt.clipboard = 'unnamedplus'
|
||||
|
||||
-- direction of new open splits
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
|
||||
-- double-tap escape to exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', {
|
||||
desc = 'Exit terminal mode'
|
||||
})
|
||||
|
||||
-- set the cwd of the buffer to the directory of the buffer's file
|
||||
-- when entering a buffer.
|
||||
vim.opt.autochdir = true
|
@ -0,0 +1,17 @@
|
||||
function packer_startup(use)
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- lsp manager
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
use {"akinsho/toggleterm.nvim", tag = "*", config = function()
|
||||
require("toggleterm").setup()
|
||||
end}
|
||||
end
|
||||
|
||||
require('packer').startup(packer_startup)
|
||||
|
||||
require('lspconfig').rust_analyzer.setup({})
|
||||
|
||||
require("toggleterm").setup{}
|
@ -1,4 +1,5 @@
|
||||
set expandtab
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
||||
let b:ale_fix_on_save = 1
|
||||
" set omnifunc=ale#completion#OmniFunc
|
||||
|
Loading…
Reference in New Issue