Compare commits

...

10 Commits

Author SHA1 Message Date
cool-mist 3acaf94e3b Disable copilot 2026-03-08 20:10:46 +05:30
cool-mist 87512c348d remove which-key 2025-08-23 10:51:06 +05:30
cool-mist 144464164f change color scheme to nord 2025-08-07 20:18:18 +05:30
cool-mist 759ed96ac1 Add ts parsers 2025-06-28 11:31:38 +05:30
cool-mist 8ffda69a16 Add treesitter 2025-06-05 19:04:09 +05:30
cool-mist b57029e65d Add keybind to run rust programs 2025-01-20 19:28:16 +05:30
surya 387b7071e8 Fix install issues over time 2024-07-15 00:06:18 +05:30
cool-mist 1d906c7440 Fix omnisharp version to a known good version 2024-04-08 16:50:25 +05:30
cool-mist 94502eca9f lazy load harpoon 2024-04-07 23:45:55 +05:30
cool-mist 3e57449f50 Better instructions 2024-04-07 00:50:52 +05:30
2 changed files with 79 additions and 83 deletions
+4 -6
View File
@@ -1,12 +1,12 @@
# Nvimconfigs #
My neovim settings. Contrary to popular opinion of breaking down your configs, this configuration is a single file because why not!! It is becoming very difficult to split them anyways with plugin dependencies on other settings, plugins defining keybinds in their setup and so on.
My neovim settings. Contrary to popular opinion of breaking down your configs, this configuration is a single file because why not!! It is very difficult to split them anyways with plugin dependencies on other plugins, plugins defining keybinds in their setup and so on.
This uses Lazy as the plugin manager.
# Prerequisites #
- Tested on Arch and Windows native. Should probably work on most linux distros.
- Tested on Arch and Windows native. Should probably work on both linux and windows.
- `neovim`
- `npm`
- `python`
@@ -15,19 +15,17 @@ This uses Lazy as the plugin manager.
- `go`
- `rust`
- `ripgrep` - for fuzzy searching
- `fzf` - for fuzzy searching
- `zk` - for notetaking
# Installation #
- `make install` if on linux.
- Otherwise, follow the manual process below
## Manually ##
Above command will take a backup of your current vim settings in `~/.config/nvim/init.lua` and installs the configs from this project. Therefore, to install manually, you can
- Download and place this manually as well in that location
- Download it elsewhere and create a symlink to this file
- Download and place this manually in that location. On windows, it is `$env:LocalAppData\nvim\init.lua`. On Linux, it is `~/.config/nvim/init.lua`.
# Post Install #
+75 -77
View File
@@ -33,7 +33,7 @@ O.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
if OS == "win" then
-- The newer pwsh is faster, but this is required for some legacy functionality
-- such as [G]o [T]eams below.
O.shell = "powershell" -- or the newer pwsh
O.shell = "powershell" -- powershell = NET Framework, pwsh = .NET Core
O.shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy Bypass -Command"
O.shellxquote = ''
end
@@ -81,64 +81,17 @@ lazy.setup({
-------------
-- Colors --
-------------
"catppuccin/nvim",
name = "catppuccin",
'arcticicestudio/nord-vim',
lazy = false,
priority = 1000,
config = function()
require('catppuccin').setup({
flavour = "frappe", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "frappe",
dark = "mocha",
},
transparent_background = true, -- disables setting the background color.
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
dim_inactive = {
enabled = false, -- dims the background color of inactive window
shade = "dark",
percentage = 0.15, -- percentage of the shade to apply to the inactive window
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
comments = { "bold" }, -- Change the style of comments
conditionals = {},
loops = {},
functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
-- miscs = {}, -- Uncomment to turn off hard-coded styles
},
color_overrides = {},
custom_highlights = {},
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = true,
indentscope_color = "",
},
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
},
})
V.cmd([[colorscheme catppuccin-frappe]])
V.cmd([[colorscheme nord]])
end,
},
{
'nvim-lualine/lualine.nvim',
opts = {
theme = "catppuccin-frappe"
theme = "nordic"
},
},
@@ -189,7 +142,7 @@ lazy.setup({
}
},
-- Nvim-notify will be plugged into the default vim notify system for a
-- Nvim-notify will be plugged into the default vim notify system for a
-- better notification box
{
"rcarriga/nvim-notify",
@@ -206,7 +159,7 @@ lazy.setup({
config = function()
require('notify').setup({
stages = "static",
timeout = 3000,
timeout = 500,
max_height = function()
return math.floor(V.o.lines * 0.75)
end,
@@ -247,14 +200,21 @@ lazy.setup({
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local harpoon = require("harpoon")
harpoon.setup({})
local opts = { noremap = true, silent = true }
V.keymap.set('n', '<leader>hh', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, opts)
V.keymap.set('n', '<leader>ha', function() harpoon:list():append() end, opts)
end
config = true,
keys = {
{
'<leader>hh',
function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end,
desc =
"[H]arpoon [H]ome"
},
{
'<leader>ha',
function() require("harpoon"):list():add() end,
desc =
"[H]arpoon [A]ppend"
},
},
},
---------------
@@ -369,10 +329,10 @@ lazy.setup({
},
-- Copilot!!
{
"github/copilot.vim",
event = { "BufReadPre", "BufNewFile" },
},
-- {
-- "github/copilot.vim",
-- event = { "BufReadPre", "BufNewFile" },
-- },
-- lspconfig is the configuration framework for the nvim lsp client. It has best effort
-- configs for every language. Mason.nvim is the plugin that will install the lsp servers
@@ -409,7 +369,7 @@ lazy.setup({
["textDocument/hover"] = V.lsp.with(V.lsp.handlers.hover, { border = border }),
["textDocument/signatureHelp"] = V.lsp.with(V.lsp.handlers.signature_help, { border = border }),
}
require("lspconfig").rust_analyzer.setup { handlers = handlers }
require("lspconfig").rust_analyzer.setup({ handlers = handlers })
-- C# --
local omnisharp_extended = require("omnisharp_extended") -- decompilation support
@@ -421,16 +381,16 @@ lazy.setup({
["textDocument/implementation"] = omnisharp_extended.implementation_handler,
}
require("lspconfig").omnisharp.setup {
require("lspconfig").omnisharp.setup({
handlers = omnisharp_handlers,
enable_editorconfig_support = true,
enable_ms_build_load_projects_on_demand = false,
enable_roslyn_analyzers = true,
organize_imports_on_format = true,
enable_import_completion = false,
enable_import_completion = true,
sdk_include_prereleases = true,
analyze_open_documents_only = true,
}
})
-- Add default LSP keybindings
V.api.nvim_create_autocmd('LspAttach', {
@@ -464,6 +424,10 @@ lazy.setup({
V.keymap.set('n', '<leader>fe', V.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
V.keymap.set('n', '<leader>fd', V.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
V.keymap.set('n', '<leader>fe', V.diagnostic.open_float, { desc = 'Open diagnostic message on the line' })
-- Define some keybinding to build the current solution
V.keymap.set('n', '<leader>dtb', function()
V.cmd('!dotnet build')
end, { silent = true })
end,
})
end,
@@ -474,15 +438,16 @@ lazy.setup({
-- This plugin provides a way to configure which LSP servers to install
"williamboman/mason-lspconfig.nvim",
config = function()
require('mason-lspconfig').setup {
require('mason-lspconfig').setup({
ensure_installed = {
"lua_ls",
"powershell_es",
"rust_analyzer",
"omnisharp",
-- "omnisharp@1.39.8", -- The last known good version
-- "netcoredbg", Install this manually, this is DAP, not LSP
}
}
})
end,
dependencies = {
-- This plugin provides a way to install LSP and DAP servers
@@ -603,7 +568,7 @@ lazy.setup({
}
}
-- Below configuration tells how to launch a debugging interactive session for a C#
-- Below configuration tells how to launch a debugging interactive session for a C#
-- application when using the netcoredbg adapeter.
dap.configurations.cs = {
{
@@ -643,10 +608,40 @@ lazy.setup({
},
-- Shows a popups with the keybindings that are available after a small delay
-- Treesitter
{
"folke/which-key.nvim",
config = true
"nvim-treesitter/nvim-treesitter",
branch = 'master',
lazy = false,
build = ":TSUpdate",
opts_extend = { "ensure_installed" },
opts = {
ensure_installed = {
"rust",
"lua",
"vim",
"vimdoc",
"ruby",
"markdown",
"bash",
"c_sharp",
"ruby",
"html",
"yaml",
"text",
"gitignore",
"markdown_inline",
"json",
"toml",
"xml",
"gitcommit",
"make",
"html",
"scss",
"yaml",
"git_config"
}
}
},
})
@@ -680,7 +675,10 @@ keymap("x", "<A-k>", ":move '<-2<cr>gv-gv", opts)
-- Misc
keymap('n', '<S-u>', ':red<cr>', opts)
keymap('n', '<ESC>', '<cmd>nohlsearch<cr>', {})
keymap('n', '<ESC>', '<cmd>nohlsearch<cr>', opts)
-- Run rust programs
keymap('n', '<leader>rr', ':!cargo run<cr>', opts)
----------
-- Misc --