From 9b1e5c706913ee07ea3e943340370285cf2213b1 Mon Sep 17 00:00:00 2001 From: Ian Griffin Date: Sat, 7 Jun 2025 14:39:08 +0800 Subject: updated --- lua/plugins/10_ide.lua | 125 +++++++++++++++++++++---------------------------- lua/plugins/50_ui.lua | 44 ++++++++++------- 2 files changed, 80 insertions(+), 89 deletions(-) (limited to 'lua/plugins') diff --git a/lua/plugins/10_ide.lua b/lua/plugins/10_ide.lua index dc355d8..7d2e08b 100644 --- a/lua/plugins/10_ide.lua +++ b/lua/plugins/10_ide.lua @@ -43,12 +43,13 @@ return { dependencies = { 'ms-jpq/coq.artifacts' }, branch = 'coq', build = ':COQdeps', - event = { "VimEnter" }, + event = { "BufEnter" }, config = function() vim.cmd([[autocmd VimEnter * COQnow -s]]) end }, + -- -- Language Configurations -- { 'ap/vim-css-color', lazy = false }, @@ -93,9 +94,11 @@ return { { 'stevearc/aerial.nvim', opts = { - backends = { 'lsp', 'markdown', 'man' }, + close_on_select = true, + -- backends = { 'lsp', 'markdown', 'man' }, layout = { - min_width = 25 + -- default_direction = 'prefer_right', + min_width = 25, }, }, keys = { @@ -129,57 +132,24 @@ return { vim.diagnostic.config({ virtual_text = false }) end }, - -- { - -- 'hrsh7th/cmp-nvim-lsp', - -- dependencies = { - -- 'hrsh7th/nvim-cmp', - -- } - -- }, - -- { - -- 'jacob411/Ollama-Copilot', - -- dependencies = { - -- 'hrsh7th/cmp-nvim-lsp', - -- }, - -- opts = { - -- model_name = "qwen2.5-coder:14b", - -- stream_suggestion = false, - -- python_command = "python3", - -- filetypes = { - -- "bash", - -- "c", - -- "cpp", - -- "cs", - -- "dart", - -- "go", - -- "html", - -- "javascript", - -- "javascriptreact", - -- "json", - -- "lua", - -- "python", - -- "tex", - -- "typescript", - -- "typescriptreact", - -- }, - -- ollama_model_opts = { - -- num_predict = 40, - -- temperature = 0.1, - -- }, - -- keymaps = { - -- suggestion = 'os', - -- reject = 'or', - -- insert_accept = '', - -- }, - - -- }, - -- }, + --[[{ + 'huggingface/llm.nvim', + opts = { + model = 'qwen2.5-coder:7b', + backend = 'ollama', + url = 'http://localhost:11434', + lsp = { + bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "/mason/bin/llm-ls", + } + }, + },]]-- { - 'williamboman/mason-lspconfig.nvim', + 'mason-org/mason-lspconfig.nvim', dependencies = { 'ms-jpq/coq_nvim', 'nanotee/nvim-lsp-basics', - -- 'jacob411/Ollama-Copilot', 'neovim/nvim-lspconfig', + -- 'huggingface/llm.nvim', 'stevearc/aerial.nvim', 'williamboman/mason.nvim', }, @@ -187,14 +157,13 @@ return { ensure_installed = { "bashls", "clangd", - "ast_grep", "gopls", "html", "jsonls", "lua_ls", "pyright", "texlab", - "tsserver" + "ts_ls" }, }, ft = { @@ -214,23 +183,23 @@ return { "typescript", "typescriptreact", }, - config = function() - local masonlsp = require 'mason-lspconfig' - --[[ - masonlsp.setup - --]] - masonlsp.setup_handlers { - function(server_name) - require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities { - on_attach = function(client, bufnr) - local basics = require('lsp_basics') - basics.make_lsp_commands(client, bufnr) - basics.make_lsp_mappings(client, bufnr) - end - }) - end - } - end + -- config = function() + -- local masonlsp = require 'mason-lspconfig' + -- --[[ + -- masonlsp.setup + -- --]] + -- masonlsp.setup_handlers { + -- function(server_name) + -- require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities { + -- on_attach = function(client, bufnr) + -- local basics = require('lsp_basics') + -- basics.make_lsp_commands(client, bufnr) + -- basics.make_lsp_mappings(client, bufnr) + -- end + -- }) + -- end + -- } + -- end, }, -- Show code diagnostics in a separate buffer window @@ -270,10 +239,14 @@ return { -- { "rest-nvim/rest.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter" + }, + ft = { "http" }, opts = { -- Open request results in a horizontal split - result_split_horizontal = true, + result_split_horizontal = false, -- Keep the http file buffer above|left when split horizontal|vertical -- result_split_in_place = true, @@ -282,6 +255,16 @@ return { }, }, keys = { + {'r', ':hor Rest run'}, + }, + + --[[ opts = function (_, opts) + opts.ensure_installed = opts.ensure_installed or {} + table.insert(opts.ensure_installed, "http") + table.insert(opts.result_split_horizontal, true) + table.insert(opts.result_split_in_place, true) + end, ]]-- + --[[ keys = { {'r', 'RestNvim'}, {'R', 'RestNvimLast'}, {'', 'RestNvimPreview'}, @@ -292,6 +275,6 @@ return { ct.defcmd('RestNvim', 'lua require(\'rest-nvim\').run()') ct.defcmd('RestNvimPreview', 'lua require(\'rest-nvim\').run(true)') ct.defcmd('RestNvimLast', 'lua require(\'rest-nvim\').last()') - end, + end, ]]-- }, } diff --git a/lua/plugins/50_ui.lua b/lua/plugins/50_ui.lua index 6b2e833..11a9a97 100644 --- a/lua/plugins/50_ui.lua +++ b/lua/plugins/50_ui.lua @@ -2,6 +2,32 @@ return { -- -- Theme -- + { + 'wuelnerdotexe/vim-enfocado', + lazy = false, + config = function() + vim.o.background = 'light' + vim.g.enfocad_style = 'nature' + vim.cmd 'colo enfocado' + end, + keys = { + { + 'c', + function() + if vim.o.background == 'light' then + vim.o.background = 'dark' + else + vim.o.background = 'light' + -- vim.api.nvim_set_hl(0, 'ColorColumn', {bg = '#c0bfbc'}) + vim.cmd('redraw') + vim.cmd('redraw') + end + end, + desc = 'toggle color themes' + }, + }, + }, + -- { -- 'navarasu/onedark.nvim', -- lazy = false, @@ -13,24 +39,6 @@ return { -- config = function() -- require('onedark').load() -- end, - -- --[[ keys = { - -- { - -- 'c', - -- function() - -- if vim.o.background == 'light' then - -- vim.o.background = 'dark' - -- else - -- vim.o.background = 'light' - -- -- vim.api.nvim_set_hl(0, 'ColorColumn', {bg = '#c0bfbc'}) - -- vim.cmd('redraw') - -- vim.cmd('redraw') - -- end - -- end, - -- desc = 'toggle color themes' - -- }, - -- }, --]] - - -- }, -- -- Indentation -- cgit v1.3