diff --git a/lua/binds.lua b/lua/binds.lua index f516f34..d237c6b 100644 --- a/lua/binds.lua +++ b/lua/binds.lua @@ -8,27 +8,27 @@ local defs = require('defs') -- Maps -- -- select all -ct.map('n', 'a', 'ggVG') +ct.map('n', 'a', 'ggVG') --[[ -- spawn terminal -ct.map('n', '', ':!' .. defs.external_term .. ' . &') +ct.map('n', '', ':!' .. defs.external_term .. ' . &') -- spwan file manager -ct.map('n', '', ':!' .. defs.external_filemgr .. ' . &') +ct.map('n', '', ':!' .. defs.external_filemgr .. ' . &') ]] -- spellchecking -ct.map('n', 's', ':set spell!') +ct.map('n', 's', ':set spell!') -- Buffer Navigation -ct.map('n', 'w', ':bnext') -ct.map('n', 'W', ':bprevious') +ct.map('n', 'w', ':bnext') +ct.map('n', 'W', ':bprevious') -- close buffer -ct.map('n', 'q', ':bd') -ct.map('n', 'wq', 'wbd') +ct.map('n', 'q', ':bd') +ct.map('n', 'wq', 'wbd') -- -- Commands -- -- ct.defcmd('Xrdb', '!xrdb %') -ct.defcmd('ExTerm', '!' .. defs.external_term .. '&') -ct.defcmd('ExFileMgr', '!' .. defs.external_filemgr .. '. &') +ct.defcmd('ExTerm', '!' .. defs.external_term .. '&') +ct.defcmd('ExFileMgr', '!' .. defs.external_filemgr .. '. &') diff --git a/lua/misc.lua b/lua/misc.lua index 9113b13..31f84c2 100644 --- a/lua/misc.lua +++ b/lua/misc.lua @@ -33,7 +33,7 @@ ct.set({'spellsuggest', {'best', 5}}) -- vim.g.netrw_liststyle = 3 -- tree style display vim.g.netrw_banner = 0 -- no banner needed -vim.g.netrw_browse_split = 4 +vim.g.netrw_browse_split = 0 -- vim.g.netrw_chgwin = 1 -- 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 diff --git a/lua/ui.lua b/lua/ui.lua index f3f25e9..e09cc95 100644 --- a/lua/ui.lua +++ b/lua/ui.lua @@ -17,7 +17,7 @@ vim.opt.list = true -- Misc. -- ct.set('ruler', 'showcmd', 'cursorline', 'title') -vim.cmd [[ colo selenized_bw ]] +-- vim.cmd [[ colo selenized_bw ]] -- ct.set('number') ct.set( -- {'termguicolors', true},