workin on nvim

master
Jordan Orelli 3 months ago
parent 7397673711
commit 8eb6159ae3

@ -0,0 +1 @@
print("You are in Python")

@ -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
},
}

@ -1,10 +0,0 @@
print("All Plugins are loaded")
for k, v in pairs(packer_plugins) do
print(k, v)
end
require("keys")
require("colors")

@ -0,0 +1 @@
print("LSP setting up")

@ -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,
},
}

@ -1,2 +1,12 @@
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
require("plugins")
require("prefs")
require("keys")

@ -2,3 +2,11 @@ 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'

@ -5,6 +5,7 @@ vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
-- this thing finds files or something
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
@ -13,5 +14,24 @@ return require('packer').startup(function(use)
}
}
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
use { 'nvim-treesitter/playground' }
use { "rose-pine/neovim", as = "rose-pine" }
-- hmmmm try this?
-- https://github.com/ThePrimeagen/harpoon/tree/harpoon2
use { "mbbill/undotree" }
use { "tpope/vim-fugitive" }
use {
"lewis6991/gitsigns.nvim"
}
end)

@ -0,0 +1,84 @@
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'
})
Loading…
Cancel
Save