feat:new nvim config and some other stuff

This commit is contained in:
2025-11-29 11:30:17 -08:00
parent d524ebac95
commit a1ef3c6e12
16 changed files with 104 additions and 259 deletions

View File

@@ -1,37 +1,5 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
require("config.lazy")
vim.opt.rtp:prepend(lazypath)
-- coq used for completion
vim.g.coq_settings = {
auto_start = true,
xdg = true,
completion = {
always = false,
},
keymap = {
manual_complete = '<c-n>',
}
}
-- code completion
require('lazy').setup('plugins')
local coq = require 'coq'
require("mason").setup() -- used for automatically enabling lsp and coq
require("mason-lspconfig").setup()
-- Settings
--vim.cmd('source ~/.config/nvim/settings.vim')
-- colorscheme
vim.o.termguicolors = true
@@ -40,6 +8,8 @@ vim.opt.winborder = 'rounded'
--vim.cmd("colorscheme gruvbox ")
--vim.cmd("colorscheme retrobox")
vim.opt.clipboard = "unnamedplus" -- uses the clipboard register for all operations except yank.
vim.cmd("set nocompatible")
vim.cmd("syntax on")
vim.cmd("filetype plugin indent on")
@@ -67,9 +37,3 @@ vim.cmd("au FileType python set fileformat=unix encoding=utf-8")
vim.cmd("au FileType markdown,tex set spell spelllang=en_us")
-- keymaps
vim.keymap.set('n', '<leader>/', ':nohlsearch<CR>')
vim.keymap.set('n', '<leader>b', ':buffers<CR>')
vim.keymap.set('n', 'bp', ':bp<CR>')
vim.keymap.set('n', 'bn', ':bn<CR>')

View File

@@ -1,16 +1,9 @@
{
"black-metal-theme-neovim": { "branch": "main", "commit": "6d0207871387077f40d5396ab1ae90520e688d36" },
"copilot.vim": { "branch": "release", "commit": "da369d90cfd6c396b1d0ec259836a1c7222fb2ea" },
"coq_nvim": { "branch": "coq", "commit": "a63d28a9aa59c20a503ce38608fb6bc7cb3842f4" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"nvim-lspconfig": { "branch": "master", "commit": "07f4e93de92e8d4ea7ab99602e3a8c9ac0fb778a" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
"telescope.nvim": { "branch": "master", "commit": "84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9" },
"vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }
}

View File

@@ -0,0 +1,35 @@
-- Bootstrap lazy.nvim
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)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
--vim.g.mapleader = "/\"
--im.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
-- install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
})

View File

@@ -1,12 +0,0 @@
return {
'github/copilot.vim',
config = function()
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
expr = true,
replace_keycodes = false
})
vim.keymap.set('i', '<C-L>', '<Plug>(copilot-accept-word)')
vim.g.copilot_enabled = 'v:false'
end
}

View File

@@ -1,23 +0,0 @@
return {
'ThePrimeagen/harpoon',
config = function(_, opts)
require('harpoon').setup(opts)
local mark = require('harpoon'.. ".mark")
local ui = require('harpoon'.. ".ui")
-- Harpoon marked files 1 through 4.
vim.keymap.set("n", "<a-1>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<a-2>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<a-3>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<a-4>", function() ui.nav_file(4) end)
-- Harpoon next and previous.
vim.keymap.set("n", "<a-n>", function() ui.nav_next() end)
vim.keymap.set("n", "<a-p>", function() ui.nav_prev() end)
-- Harpoon user interface.
vim.keymap.set("n", "<leader>hq", ui.toggle_quick_menu)
vim.keymap.set("n", "<leader>ha", mark.add_file)
end
}

View File

@@ -1,12 +0,0 @@
return {
"mason-org/mason-lspconfig.nvim",
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
"ms-jpq/coq_nvim", -- Optional (auto complete)
},
config = function()
--vim.lsp.config('lua_ls',coq.lsp_ensure_capabilities())
--vim.lsp.config('clangd',coq.lsp_ensure_capabilities())
end
}

View File

@@ -1,46 +0,0 @@
return{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons', opt = true },
config = function()
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
end
}

View File

@@ -0,0 +1,6 @@
-- plugins/telescope.lua:
return {
'neovim/nvim-lspconfig',
config = function()
end
}

View File

@@ -1,12 +1,13 @@
-- plugins/telescope.lua:
return {
'nvim-telescope/telescope.nvim', tag = '0.1.2',
'nvim-telescope/telescope.nvim', tag = 'v0.1.9',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
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, {})
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, {})
require('telescope').setup{
pickers = {

View File

@@ -1,56 +0,0 @@
set nocompatible
syntax on
filetype plugin indent on
set number
set relativenumber
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4
set smartindent
set backspace=indent,eol,start
set colorcolumn=81
"hi ColorColumn ctermbg=lightgrey guibg=lightgrey
set textwidth=80
set wrap
set linebreak
set autoread " Set to auto read when a file is changed from the outside
set path+=**
set wildmenu
set showcmd
set wildmode=longest:full,full
set wildoptions=pum
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
set wildignore+=*\\tmp\\*,*.exe
set number ruler
set showmatch
set showbreak=↳\ \
set hidden
set hlsearch
set noswapfile
set mouse= "remove mouse
"set clipboard=unnamedplus
" Rendering
set ttyfast
set laststatus=1
set t_Co=256
let &t_ut=''
"hi ColorColumn ctermbg=lightgrey guibg=lightgrey
" Show bad whitespace in an obvious but not obnoxious color
"highlight pythonSpaceError ctermbg=darkgreen guibg=darkgreen
"highlight BadWhitespace ctermbg=darkgreen guibg=darkgreen
"au BufNewFile,BufRead *.py,*.pyw,*.c,*.h,*.cc,*.hh,*.sh match BadWhitespace /\s\+$/
au FileType python
\ set fileformat=unix
\ encoding=utf-8
au FileType markdown,tex
\ set spell spelllang=en_us

View File

@@ -1,10 +0,0 @@
Generative
ansible
CXI
HPLC
SED
brokhorst
MOXA
CONFIG
QRIX
EPS

Binary file not shown.