From 5048949d2ac546aa8ca1e4b0230cae8edae49f1f Mon Sep 17 00:00:00 2001 From: Johannes Knopp Date: Mon, 13 Jan 2025 22:19:32 +0100 Subject: [PATCH] misc settings --- nvim/lua/config/plugins/flutter.lua | 9 ++++ nvim/lua/config/plugins/lsp/lspconfig.lua | 59 +++++++++++++---------- nvim/lua/config/plugins/todo-comments.lua | 19 +++++++- zsh/.zshrc | 3 +- zsh/aliases.zsh | 2 + zsh/tools.zsh | 1 + 6 files changed, 65 insertions(+), 28 deletions(-) create mode 100644 nvim/lua/config/plugins/flutter.lua create mode 100644 zsh/tools.zsh diff --git a/nvim/lua/config/plugins/flutter.lua b/nvim/lua/config/plugins/flutter.lua new file mode 100644 index 0000000..4242acb --- /dev/null +++ b/nvim/lua/config/plugins/flutter.lua @@ -0,0 +1,9 @@ +return { + 'nvim-flutter/flutter-tools.nvim', + lazy = false, + dependencies = { + 'nvim-lua/plenary.nvim', + 'stevearc/dressing.nvim', -- optional for vim.ui.select + }, + config = true, +} diff --git a/nvim/lua/config/plugins/lsp/lspconfig.lua b/nvim/lua/config/plugins/lsp/lspconfig.lua index 171cae2..ea2a2be 100644 --- a/nvim/lua/config/plugins/lsp/lspconfig.lua +++ b/nvim/lua/config/plugins/lsp/lspconfig.lua @@ -81,36 +81,43 @@ return { ['ts_ls'] = function() lspconfig['ts_ls'].setup({ capabilities = capabilities, - }) - end, - ['pyright'] = function() - lspconfig['pyright'].setup({ - cmd = { "pyright-langserver", "--stdio" }, - filetypes = { "python" }, - -- root_dir = function(filename) - -- return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename) - -- end, - settings = { - python = { - analysis = { - autoSearchPaths = true, - diagnosticMode = "workspace", - useLibraryCodeForTypes = true - } + -- cmd = { "typescript-language-server", "--stdio" }, + init_options = { + hostInfo = "neovim", + prferences = { + includePackagesJsonAutoImports = "on", } } - -- capabilities = capabilities, - -- settings = { - -- python = { - -- analysis = { - -- useLibraryCodeForTypes = true, - -- typeCheckingMode = "basic", - -- -- configPath = vim.fn.expand('./pyrightconfig.json') - -- } - -- } - -- }, }) end, + -- ['pyright'] = function() + -- lspconfig['pyright'].setup({ + -- -- cmd = { "pyright-langserver", "--stdio" }, + -- -- filetypes = { "python" }, + -- -- root_dir = function(filename) + -- -- return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename) + -- -- end, + -- -- settings = { + -- -- python = { + -- -- analysis = { + -- -- autoSearchPaths = true, + -- -- diagnosticMode = "workspace", + -- -- useLibraryCodeForTypes = true + -- -- } + -- -- } + -- -- } + -- capabilities = capabilities, + -- settings = { + -- python = { + -- analysis = { + -- useLibraryCodeForTypes = true, + -- typeCheckingMode = "basic", + -- -- configPath = vim.fn.expand('./pyrightconfig.json') + -- } + -- } + -- }, + -- }) + -- end, }) end } diff --git a/nvim/lua/config/plugins/todo-comments.lua b/nvim/lua/config/plugins/todo-comments.lua index 7d3475d..4570e8d 100644 --- a/nvim/lua/config/plugins/todo-comments.lua +++ b/nvim/lua/config/plugins/todo-comments.lua @@ -1,5 +1,22 @@ return { 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, - opts = {}, + lazy = false, + config = function() + require("todo-comments").setup({ + -- keywords = { + -- TODO = { icon = " ", color = "custom" }, + -- }, + -- colors = { + -- custom = { fg = "#FF0000", bg = "#000000" }, + -- }, + highlight = { + pattern = [[.*<(KEYWORDS)\s*]], + }, + search = { + pattern = [[\b(KEYWORDS)\b]], + } + + }) + end } diff --git a/zsh/.zshrc b/zsh/.zshrc index 84a72b3..880b612 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -104,9 +104,10 @@ fi # alias ohmyzsh="mate ~/.oh-my-zsh" bindkey '^R' history-incremental-search-backward - +# TODO source all files with .zsh suffix source ~/dotfiles/zsh/aliases.zsh source ~/dotfiles/zsh/dev_env.zsh +source ~/dotfiles/zsh/tools.zsh diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 4d7d065..5c65548 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -2,3 +2,5 @@ alias vim='nvim' alias tp='trash-put' alias tl='trash-list' + +alias zrc='source ~/.zshrc' diff --git a/zsh/tools.zsh b/zsh/tools.zsh new file mode 100644 index 0000000..8075b18 --- /dev/null +++ b/zsh/tools.zsh @@ -0,0 +1 @@ +source /usr/share/autojump/autojump.zsh