Bunch of updates to NVIM setup for Windows
Updated Settings * Added new keymaps in keys.lua * improved LSP setup Plugins Removed * codellama * hardtime Additional Plugins added * Added edgy * Added neo-tree * Added todo-comments * Added which-key
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'David-kunz/gen.nvim',
|
||||
opts = {
|
||||
model = "codellama:7b",
|
||||
host = "localhost",
|
||||
port = "11434",
|
||||
quit_mape = "q",
|
||||
init = function (options) pcall(io.popen("ollama serve > /dev/null 2>&1 &)")) end,
|
||||
display_mode = "split",
|
||||
command =function (options)
|
||||
local body = {model = options.model, stream=true}
|
||||
return "curl --silent --no-buffer -X POST http://" .. options.host .. ':' .. options.port .. "/api/chat -d $body"
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
@ -22,6 +22,18 @@ return {
|
||||
},
|
||||
config = function ()
|
||||
local dap = require('dap')
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch",
|
||||
type= "codelldb",
|
||||
request = "launch",
|
||||
program = function ()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}/Framework',
|
||||
stopOnEntry = false,
|
||||
}
|
||||
}
|
||||
dap.configurations.java = {
|
||||
{
|
||||
type = 'java';
|
||||
@ -60,6 +72,14 @@ return {
|
||||
args = {'dap', '-l', '127.0.0.1:${port}'},
|
||||
}
|
||||
}
|
||||
dap.adapters.codelldb = {
|
||||
type= 'server',
|
||||
port = '${port}',
|
||||
executable = {
|
||||
command = 'C:/Users/Nigel/Appdata/Local/nvim-data/mason/bin/codelldb.cmd',
|
||||
args = {"--port", "${port}"}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
|
9
lua/barink/plugins/edgy.lua
Normal file
9
lua/barink/plugins/edgy.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"folke/edgy.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
init = function ()
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.splitkeep = "screen"
|
||||
end
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'm4xshen/hardtime.nvim',
|
||||
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim"},
|
||||
opts = {
|
||||
restriction_mode = "hint"
|
||||
}
|
||||
}
|
||||
}
|
@ -2,6 +2,10 @@ return
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{
|
||||
"folke/neoconf.nvim",
|
||||
opts = {}
|
||||
},
|
||||
"williamboman/mason-lspconfig",
|
||||
"williamboman/mason.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
@ -111,6 +115,26 @@ return
|
||||
require('lspconfig')['asm_lsp'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
local root_files = {
|
||||
'premake5.lua',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands',
|
||||
'compile_commands.json',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git'
|
||||
}
|
||||
local util = require('lspconfig.util')
|
||||
require('lspconfig')['clangd'].setup({
|
||||
capabilities = capabilities,
|
||||
filetypes= { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto' },
|
||||
cmd = { 'clangd' },
|
||||
single_file_support = true,
|
||||
root_dir = function (fname)
|
||||
return util.root_pattern(unpack(root_files))(fname)
|
||||
end
|
||||
})
|
||||
|
||||
require('lspconfig')['zls'].setup({
|
||||
capabilities = capabilities
|
||||
@ -131,6 +155,10 @@ return
|
||||
require('lspconfig')['gopls'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
require('lspconfig')['tsserver'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
|
9
lua/barink/plugins/neo-tree.lua
Normal file
9
lua/barink/plugins/neo-tree.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim"
|
||||
},
|
||||
}
|
@ -6,15 +6,7 @@ return {
|
||||
{'nvim-lua/plenary.nvim'},
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = function () if os == 'Windows_NT' then
|
||||
print("You are on Windows, Idiot!!!")
|
||||
return [[
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
|
||||
&& cmake --build build --config Release
|
||||
&& cmake --install build --prefix build
|
||||
]] else
|
||||
return 'make' end
|
||||
end,
|
||||
build ="cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
|
8
lua/barink/plugins/todo-comments.lua
Normal file
8
lua/barink/plugins/todo-comments.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
opts = {
|
||||
}
|
||||
}
|
@ -1,14 +1,33 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/playground",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require 'nvim-treesitter.install'.compilers = {'clang'}
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
playground = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
updatetime = 25,
|
||||
keybindings = {
|
||||
toggle_query_editor = 'o',
|
||||
toggle_hl_groups = 'i',
|
||||
update = 'R',
|
||||
show_help = '?'
|
||||
}
|
||||
},
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "bash" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
}
|
||||
},
|
||||
}
|
||||
|
15
lua/barink/plugins/which-key.lua
Normal file
15
lua/barink/plugins/which-key.lua
Normal file
@ -0,0 +1,15 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({global = false})
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user