diff --git a/.config/nvim/lua/custom/config/language-servers.lua b/.config/nvim/lua/custom/config/language-servers.lua index 1ca9ed7..5e62067 100644 --- a/.config/nvim/lua/custom/config/language-servers.lua +++ b/.config/nvim/lua/custom/config/language-servers.lua @@ -1,130 +1,130 @@ -- NOTE: a table or true to enable, false to disable return { - lua_ls = { - settings = { - diagnostics = { globals = { 'vim' } }, - telemetry = { enabled = false }, - hint = { enable = true }, - workspace = { - library = { - [vim.fn.expand('$VIMRUNTIME/lua')] = true, - [vim.fn.stdpath('config') .. '/lua'] = true, - }, - }, - }, - }, -- lua - clangd = { - cmd = { - 'clangd', - '--background-index', - '--clang-tidy', - '--header-insertion=iwyu', - '--completion-style=detailed', - '--function-arg-placeholders', - '--fallback-style=llvm', - }, - root_dir = function(filename) - return require('lspconfig/util').root_pattern( - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - '.git' - )(filename) or vim.fn.getcwd() - end, - init_options = { - usePlaceholders = true, - completeUnimported = true, - clangdFileStatus = true, - }, - }, -- c/cpp - neocmake = { - root_dir = function(filename) - return require('lspconfig/util').root_pattern( - 'CMakePresets.json', - 'CTestConfig.cmake', - 'build', - 'cmake', - '.git' -- NOTE: git is last due to monorepos (so it tries to use build/cmake first) - )(filename) or vim.fn.getcwd() - end, - }, - pyright = { - settings = { - python = { - pythonPath = '~/python/venv/bin/python', - }, - }, - }, -- python - bashls = true, -- bash - taplo = true, -- toml - lemminx = true, -- xml - yamlls = true, -- yaml - jsonls = true, -- json - html = true, -- html - cssls = true, -- css - ts_ls = true, -- javascript/typescript - astro = true, -- astro framework - mdx_analyzer = true, -- markdown with JS I think - -- marksman = true, -- Markdown LSP - markdown_oxide = true, -- Markdown LSP but better - gopls = { - cmd = { 'gopls' }, - filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, - root_dir = function(filename) - return require('lspconfig/util').root_pattern('go.work', 'go.mod', '.git')(filename) - end, - settings = { - gopls = { - gofumpt = true, - codelenses = { - gc_details = false, - generate = true, - regenerate_cgo = true, - run_govulncheck = true, - test = true, - tidy = true, - upgrade_dependency = true, - vendor = true, - }, - hints = { - assignVariableTypes = false, - compositeLiteralFields = false, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = false, - parameterNames = false, - rangeVariableTypes = true, - }, - analyses = { - fieldalignment = true, - nilness = true, - unusedparams = true, - unusedwrite = true, - useany = true, - }, - usePlaceholders = false, - completeUnimported = true, - staticcheck = true, - directoryFilters = { '-.git', '-.vscode', '-.idea', '-.vscode-test', '-node_modules' }, - semanticTokens = true, - }, - }, - }, -- Go LSP - jdtls = true, -- java - -- sqlls = true, - -- sqls = { - -- on_attach = function(client, bufnr) - -- require('sqls').on_attach(client, bufnr) - -- end, + -- lua_ls = { -- settings = { - -- sqls = { - -- connections = { - -- { - -- driver = 'sqlite3', - -- dataSourceName = '/home/kyren/projects/eko/server.db', - -- }, + -- diagnostics = { globals = { 'vim' } }, + -- telemetry = { enabled = false }, + -- hint = { enable = true }, + -- workspace = { + -- library = { + -- [vim.fn.expand('$VIMRUNTIME/lua')] = true, + -- [vim.fn.stdpath('config') .. '/lua'] = true, -- }, -- }, -- }, + -- }, -- lua + -- clangd = { + -- cmd = { + -- 'clangd', + -- '--background-index', + -- '--clang-tidy', + -- '--header-insertion=iwyu', + -- '--completion-style=detailed', + -- '--function-arg-placeholders', + -- '--fallback-style=llvm', + -- }, + -- root_dir = function(filename) + -- return require('lspconfig/util').root_pattern( + -- '.clang-tidy', + -- '.clang-format', + -- 'compile_commands.json', + -- '.git' + -- )(filename) or vim.fn.getcwd() + -- end, + -- init_options = { + -- usePlaceholders = true, + -- completeUnimported = true, + -- clangdFileStatus = true, + -- }, + -- }, -- c/cpp + -- neocmake = { + -- root_dir = function(filename) + -- return require('lspconfig/util').root_pattern( + -- 'CMakePresets.json', + -- 'CTestConfig.cmake', + -- 'build', + -- 'cmake', + -- '.git' -- NOTE: git is last due to monorepos (so it tries to use build/cmake first) + -- )(filename) or vim.fn.getcwd() + -- end, -- }, + -- pyright = { + -- settings = { + -- python = { + -- pythonPath = '~/python/venv/bin/python', + -- }, + -- }, + -- }, -- python + -- bashls = true, -- bash + -- taplo = true, -- toml + -- lemminx = true, -- xml + -- yamlls = true, -- yaml + -- jsonls = true, -- json + -- html = true, -- html + -- cssls = true, -- css + -- ts_ls = true, -- javascript/typescript + -- astro = true, -- astro framework + -- mdx_analyzer = true, -- markdown with JS I think + -- -- marksman = true, -- Markdown LSP + -- markdown_oxide = true, -- Markdown LSP but better + -- gopls = { + -- cmd = { 'gopls' }, + -- filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, + -- root_dir = function(filename) + -- return require('lspconfig/util').root_pattern('go.work', 'go.mod', '.git')(filename) + -- end, + -- settings = { + -- gopls = { + -- gofumpt = true, + -- codelenses = { + -- gc_details = false, + -- generate = true, + -- regenerate_cgo = true, + -- run_govulncheck = true, + -- test = true, + -- tidy = true, + -- upgrade_dependency = true, + -- vendor = true, + -- }, + -- hints = { + -- assignVariableTypes = false, + -- compositeLiteralFields = false, + -- compositeLiteralTypes = true, + -- constantValues = true, + -- functionTypeParameters = false, + -- parameterNames = false, + -- rangeVariableTypes = true, + -- }, + -- analyses = { + -- fieldalignment = true, + -- nilness = true, + -- unusedparams = true, + -- unusedwrite = true, + -- useany = true, + -- }, + -- usePlaceholders = false, + -- completeUnimported = true, + -- staticcheck = true, + -- directoryFilters = { '-.git', '-.vscode', '-.idea', '-.vscode-test', '-node_modules' }, + -- semanticTokens = true, + -- }, + -- }, + -- }, -- Go LSP + -- jdtls = true, -- java + -- -- sqlls = true, + -- -- sqls = { + -- -- on_attach = function(client, bufnr) + -- -- require('sqls').on_attach(client, bufnr) + -- -- end, + -- -- settings = { + -- -- sqls = { + -- -- connections = { + -- -- { + -- -- driver = 'sqlite3', + -- -- dataSourceName = '/home/kyren/projects/eko/server.db', + -- -- }, + -- -- }, + -- -- }, + -- -- }, + -- -- }, } diff --git a/.config/nvim/lua/custom/config/telescope.lua b/.config/nvim/lua/custom/config/telescope.lua index 5a84121..71a2e5a 100644 --- a/.config/nvim/lua/custom/config/telescope.lua +++ b/.config/nvim/lua/custom/config/telescope.lua @@ -18,8 +18,8 @@ telescope.setup({ }, }) -pcall(telescope.load_extension('ui-select')) -pcall(telescope.load_extension('fzf')) +-- pcall(telescope.load_extension('ui-select')) +-- pcall(telescope.load_extension('fzf')) local builtin = require('telescope.builtin') local function find_all() diff --git a/.config/nvim/lua/custom/plugins/auto-save.lua b/.config/nvim/lua/custom/plugins/auto-save.lua index 5da836b..1fac72f 100644 --- a/.config/nvim/lua/custom/plugins/auto-save.lua +++ b/.config/nvim/lua/custom/plugins/auto-save.lua @@ -1,33 +1,33 @@ return { - 'okuuva/auto-save.nvim', - cmd = 'ASToggle', - event = { 'InsertLeave', 'TextChanged' }, - opts = function() - -- Disable autoformat between automatic saves - vim.api.nvim_create_autocmd('User', { - pattern = 'AutoSaveWritePre', - group = vim.api.nvim_create_augroup('autosave-pre', { clear = true }), - callback = function(opts) - local bufnr = opts.data.saved_buffer - vim.b[bufnr].disable_autoformat = true - end, - }) - - vim.api.nvim_create_autocmd('User', { - pattern = 'AutoSaveWritePost', - group = vim.api.nvim_create_augroup('autosave-post', { clear = true }), - callback = function(opts) - local bufnr = opts.data.saved_buffer - vim.b[bufnr].disable_autoformat = false - end, - }) - - return { - -- execution_message = { enabled = false }, removed - condition = function(buf) - -- Save only if the buffer is not a "special buffer" - return vim.fn.getbufvar(buf, '&buftype') == '' - end, - } - end, + -- 'okuuva/auto-save.nvim', + -- cmd = 'ASToggle', + -- event = { 'InsertLeave', 'TextChanged' }, + -- opts = function() + -- -- Disable autoformat between automatic saves + -- vim.api.nvim_create_autocmd('User', { + -- pattern = 'AutoSaveWritePre', + -- group = vim.api.nvim_create_augroup('autosave-pre', { clear = true }), + -- callback = function(opts) + -- local bufnr = opts.data.saved_buffer + -- vim.b[bufnr].disable_autoformat = true + -- end, + -- }) + -- + -- vim.api.nvim_create_autocmd('User', { + -- pattern = 'AutoSaveWritePost', + -- group = vim.api.nvim_create_augroup('autosave-post', { clear = true }), + -- callback = function(opts) + -- local bufnr = opts.data.saved_buffer + -- vim.b[bufnr].disable_autoformat = false + -- end, + -- }) + -- + -- return { + -- -- execution_message = { enabled = false }, removed + -- condition = function(buf) + -- -- Save only if the buffer is not a "special buffer" + -- return vim.fn.getbufvar(buf, '&buftype') == '' + -- end, + -- } + -- end, } diff --git a/.config/nvim/lua/custom/plugins/auto-session.lua b/.config/nvim/lua/custom/plugins/auto-session.lua index cd8d7a4..33b19ff 100644 --- a/.config/nvim/lua/custom/plugins/auto-session.lua +++ b/.config/nvim/lua/custom/plugins/auto-session.lua @@ -1,29 +1,29 @@ return { - 'rmagatti/auto-session', - lazy = false, - config = function() - vim.opt.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions' - require('auto-session').setup({ - log_level = 'error', - auto_session_suppress_dirs = { '~/', '/' }, - session_lens = { load_on_setup = false }, - no_restore_cmds = { - function() - if vim.fn.argc() == 0 then - vim.cmd('Alpha') - end - end, - }, - }) - - local session_lens_setup_done = false - local function search_session() - if not session_lens_setup_done then - require('auto-session').setup_session_lens() - session_lens_setup_done = true - end - require('auto-session.session-lens').search_session() - end - vim.keymap.set('n', '', search_session, { desc = '[S]ession Manager' }) - end, + -- 'rmagatti/auto-session', + -- lazy = false, + -- config = function() + -- vim.opt.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions' + -- require('auto-session').setup({ + -- log_level = 'error', + -- auto_session_suppress_dirs = { '~/', '/' }, + -- session_lens = { load_on_setup = false }, + -- no_restore_cmds = { + -- function() + -- if vim.fn.argc() == 0 then + -- vim.cmd('Alpha') + -- end + -- end, + -- }, + -- }) + -- + -- local session_lens_setup_done = false + -- local function search_session() + -- if not session_lens_setup_done then + -- require('auto-session').setup_session_lens() + -- session_lens_setup_done = true + -- end + -- require('auto-session.session-lens').search_session() + -- end + -- vim.keymap.set('n', '', search_session, { desc = '[S]ession Manager' }) + -- end, } diff --git a/.config/nvim/lua/custom/plugins/colorscheme.lua b/.config/nvim/lua/custom/plugins/colorscheme.lua index 871066a..916eae2 100644 --- a/.config/nvim/lua/custom/plugins/colorscheme.lua +++ b/.config/nvim/lua/custom/plugins/colorscheme.lua @@ -10,5 +10,5 @@ return { vim.cmd.colorscheme('carbonight') end, }, - { dir = '~/projects/carbonight' }, + { dir = '~/projects/carbonight.nvim' }, } diff --git a/.config/nvim/lua/custom/plugins/conform.lua b/.config/nvim/lua/custom/plugins/conform.lua index 5569159..973e5dc 100644 --- a/.config/nvim/lua/custom/plugins/conform.lua +++ b/.config/nvim/lua/custom/plugins/conform.lua @@ -12,18 +12,18 @@ return { ---@type conform.setupOpts opts = { formatters_by_ft = { - ['lua'] = { 'stylua' }, - ['c'] = { 'clang-format' }, - ['python'] = { 'isort', 'black' }, - ['rust'] = { 'rustfmt' }, - ['go'] = { 'gofumpt', 'goimports-reviser' }, - ['markdown'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['yaml'] = { 'prettierd' }, - ['json'] = { 'jq' }, - ['html'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['css'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['javascript'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['typescript'] = { 'prettierd', 'prettier', stop_after_first = true }, + -- ['lua'] = { 'stylua' }, + -- ['c'] = { 'clang-format' }, + -- ['python'] = { 'isort', 'black' }, + -- ['rust'] = { 'rustfmt' }, + -- ['go'] = { 'gofumpt', 'goimports-reviser' }, + -- ['markdown'] = { 'prettierd', 'prettier', stop_after_first = true }, + -- ['yaml'] = { 'prettierd' }, + -- ['json'] = { 'jq' }, + -- ['html'] = { 'prettierd', 'prettier', stop_after_first = true }, + -- ['css'] = { 'prettierd', 'prettier', stop_after_first = true }, + -- ['javascript'] = { 'prettierd', 'prettier', stop_after_first = true }, + -- ['typescript'] = { 'prettierd', 'prettier', stop_after_first = true }, }, format_on_save = function(bufnr) -- Disable with a global or buffer local variable diff --git a/.config/nvim/lua/custom/plugins/mason.lua b/.config/nvim/lua/custom/plugins/mason.lua index 7d18810..8232b88 100644 --- a/.config/nvim/lua/custom/plugins/mason.lua +++ b/.config/nvim/lua/custom/plugins/mason.lua @@ -17,21 +17,21 @@ return { lazy = false, opts = { ensure_installed = { - 'stylua', -- lua formatting - 'clang-format', -- C/C++ formatter - 'codelldb', -- C/C++ debugger - 'cpplint', -- C/C++ linter - 'black', -- python formatter - 'isort', -- python formatter for imports - 'flake8', -- python linter - 'gofumpt', -- go formatter - -- 'golangci-lint', -- go linter - 'prettierd', -- multi-lang formatter - 'prettier', -- prettierd but slower, used as a fallback - 'jq', -- json formatter - 'jsonlint', -- json linter - 'shellcheck', -- bash linter - 'beautysh', -- shell formatter + -- 'stylua', -- lua formatting + -- 'clang-format', -- C/C++ formatter + -- 'codelldb', -- C/C++ debugger + -- 'cpplint', -- C/C++ linter + -- 'black', -- python formatter + -- 'isort', -- python formatter for imports + -- 'flake8', -- python linter + -- 'gofumpt', -- go formatter + -- -- 'golangci-lint', -- go linter + -- 'prettierd', -- multi-lang formatter + -- 'prettier', -- prettierd but slower, used as a fallback + -- 'jq', -- json formatter + -- 'jsonlint', -- json linter + -- 'shellcheck', -- bash linter + -- 'beautysh', -- shell formatter }, }, }, diff --git a/.config/nvim/lua/custom/plugins/telescope.lua b/.config/nvim/lua/custom/plugins/telescope.lua index af0534b..3ba7d0d 100644 --- a/.config/nvim/lua/custom/plugins/telescope.lua +++ b/.config/nvim/lua/custom/plugins/telescope.lua @@ -3,8 +3,8 @@ return { tag = '0.1.5', dependencies = { 'nvim-lua/plenary.nvim', - { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, - 'nvim-telescope/telescope-ui-select.nvim', + -- { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, + -- 'nvim-telescope/telescope-ui-select.nvim', }, cmd = 'Telescope', config = function() diff --git a/.gitconfig b/.gitconfig index 3de0347..3519717 100644 --- a/.gitconfig +++ b/.gitconfig @@ -12,7 +12,7 @@ rebase = true [core] editor = nvim - pager = delta --syntax-theme='Monokai Extended' + pager = nvim -R [interactive] diffFilter = delta --color-only [delta] @@ -21,3 +21,5 @@ gpgSign = true [gpg] format = ssh +[color] + pager = no diff --git a/.zshrc b/.zshrc index c63879b..c0c04a8 100644 --- a/.zshrc +++ b/.zshrc @@ -63,7 +63,8 @@ alias vim='nvim' alias gs='git status' export EDITOR=nvim -# export PAGER=nvimpager +export PAGER='nvim -R' +export MANPAGER='nvim +Man!' export FZF_DEFAULT_OPTS=" \ --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \