From dcbe6a8f9baf9410dd61c9eb29b61af8ae1fdbf5 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 1 Oct 2024 12:06:34 +0200 Subject: [PATCH] many changes --- after/plugin/dap/dap-c.lua | 2 +- after/plugin/dap/dap-dart.lua | 19 +++++++++++++++++++ after/plugin/lsp/lsp-angular.lua | 10 ++++++++++ after/plugin/lsp/lsp-flutter.lua | 5 +++++ after/plugin/lsp/lsp-haskell.lua | 1 + after/plugin/lsp/lsp-python.lua | 2 +- after/plugin/lsp/lsp-ts.lua | 2 +- after/plugin/treesitter.lua | 4 ++++ lua/myworkflow/init.lua | 1 + lua/myworkflow/packer.lua | 9 ++++++--- lua/myworkflow/ui.lua | 1 + package-lock.json | 6 ++++++ 12 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 after/plugin/dap/dap-dart.lua create mode 100644 after/plugin/lsp/lsp-angular.lua create mode 100644 after/plugin/lsp/lsp-haskell.lua create mode 100644 lua/myworkflow/ui.lua create mode 100644 package-lock.json diff --git a/after/plugin/dap/dap-c.lua b/after/plugin/dap/dap-c.lua index f48408d..0f29bbe 100644 --- a/after/plugin/dap/dap-c.lua +++ b/after/plugin/dap/dap-c.lua @@ -1,7 +1,7 @@ local dap = require('dap') dap.adapters.lldb = { type = 'executable', - command = '/usr/bin/lldb-vscode', + command = '/usr/bin/lldb-dap', name = 'lldb' } diff --git a/after/plugin/dap/dap-dart.lua b/after/plugin/dap/dap-dart.lua new file mode 100644 index 0000000..27b1a07 --- /dev/null +++ b/after/plugin/dap/dap-dart.lua @@ -0,0 +1,19 @@ +local dap = require('dap') +dap.adapters.dart = { + type = 'executable', + command = 'flutter', + args = { "debug_adapter" } +} + +dap.configurations.dart = { + { + type = "dart", + request = "launch", + name = "Launch Flutter Program", + -- The nvim-dap plugin populates this variable with the filename of the current buffer + program = "${file}", + -- The nvim-dap plugin populates this variable with the editor's current working directory + cwd = "${workspaceFolder}", + toolArgs = { "test", "-d", "linux" }, + } +} diff --git a/after/plugin/lsp/lsp-angular.lua b/after/plugin/lsp/lsp-angular.lua new file mode 100644 index 0000000..3dfa1bf --- /dev/null +++ b/after/plugin/lsp/lsp-angular.lua @@ -0,0 +1,10 @@ +local pwd = vim.loop.cwd() +local cmd = { "ngserver", "--stdio", "--tsProbeLocations", pwd .. "/node_modules", "--ngProbeLocations", + pwd .. "/node_modules" } + +require 'lspconfig'.angularls.setup { + cmd = cmd, + on_new_config = function(new_config, new_root_dir) + new_config.cmd = cmd + end, +} diff --git a/after/plugin/lsp/lsp-flutter.lua b/after/plugin/lsp/lsp-flutter.lua index 5f0cb87..efe4f60 100644 --- a/after/plugin/lsp/lsp-flutter.lua +++ b/after/plugin/lsp/lsp-flutter.lua @@ -15,4 +15,9 @@ require('flutter-tools').setup { } end, }, + lsp = { + settings = { + analysisExcludedFolders = {}, + }, + }, } diff --git a/after/plugin/lsp/lsp-haskell.lua b/after/plugin/lsp/lsp-haskell.lua new file mode 100644 index 0000000..cbb7f8f --- /dev/null +++ b/after/plugin/lsp/lsp-haskell.lua @@ -0,0 +1 @@ +require 'lspconfig'.hls.setup {} diff --git a/after/plugin/lsp/lsp-python.lua b/after/plugin/lsp/lsp-python.lua index d18564a..f9b15e0 100644 --- a/after/plugin/lsp/lsp-python.lua +++ b/after/plugin/lsp/lsp-python.lua @@ -1 +1 @@ -require'lspconfig'.pylsp.setup{} +require 'lspconfig'.pyright.setup {} diff --git a/after/plugin/lsp/lsp-ts.lua b/after/plugin/lsp/lsp-ts.lua index 2d696e7..e4d2a74 100644 --- a/after/plugin/lsp/lsp-ts.lua +++ b/after/plugin/lsp/lsp-ts.lua @@ -1 +1 @@ -require('lspconfig').tsserver.setup {} +--require('lspconfig').tsserver.setup {} diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua index 19a3d8f..38a5033 100644 --- a/after/plugin/treesitter.lua +++ b/after/plugin/treesitter.lua @@ -2,6 +2,8 @@ require 'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the five listed parsers should always be installed) ensure_installed = { "go", "rust", "toml", "c", "lua", "vim", "vimdoc", "query" }, + modules = {}, + -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, @@ -9,6 +11,8 @@ require 'nvim-treesitter.configs'.setup { -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally auto_install = true, + ignore_install = {}, + highlight = { enable = true, diff --git a/lua/myworkflow/init.lua b/lua/myworkflow/init.lua index bbac49f..7137dd1 100644 --- a/lua/myworkflow/init.lua +++ b/lua/myworkflow/init.lua @@ -3,3 +3,4 @@ require("myworkflow.set") require("myworkflow.packer") require("myworkflow.autocommands") require("myworkflow.go-tests") +require("myworkflow.ui") diff --git a/lua/myworkflow/packer.lua b/lua/myworkflow/packer.lua index 72f20a8..e9c96a2 100644 --- a/lua/myworkflow/packer.lua +++ b/lua/myworkflow/packer.lua @@ -2,6 +2,9 @@ vim.cmd [[packadd packer.nvim]] return require('packer').startup(function(use) + -- Packer can manage itself + use 'wbthomason/packer.nvim' + -- Telescope use { 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/plenary.nvim' } } @@ -15,9 +18,6 @@ return require('packer').startup(function(use) -- fugitive use 'tpope/vim-fugitive' - -- Packer can manage itself - use 'wbthomason/packer.nvim' - -- undotree use 'mbbill/undotree' @@ -71,4 +71,7 @@ return require('packer').startup(function(use) -- VimTex use 'lervag/vimtex' + + --- highlight indendation with lines + use 'lukas-reineke/indent-blankline.nvim' end) diff --git a/lua/myworkflow/ui.lua b/lua/myworkflow/ui.lua new file mode 100644 index 0000000..be401dd --- /dev/null +++ b/lua/myworkflow/ui.lua @@ -0,0 +1 @@ +require("ibl").setup() diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b7ea3d5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "nvim", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}