diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..1e1765c --- /dev/null +++ b/.luarc.json @@ -0,0 +1,5 @@ +{ + "diagnostics.globals": [ + "vim" + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 2b7c2a5..307648e 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,43 @@ ## Used plugins - https://github.com/folke/lazy.nvim (plugin manager) + +### Ricing plugins - https://github.com/neanias/everforest-nvim (colour scheme) -- https://github.com/catppuccin/nvim?tab=readme-ov-file (colour scheme) - https://github.com/nvim-lualine/lualine.nvim (status bar) -- https://github.com/nvim-telescope/telescope.nvim (fuzzy finder) + +### Basic utilitiy plugins +- https://github.com/nvim-telescope/telescope.nvim (fuzzy finder +- https://github.com/nvim-telescope/telescope-ui-select.nvim (ui for code actions) +) - https://github.com/nvim-treesitter/nvim-treesitter (tree sitter plugin old) - https://github.com/nvim-neo-tree/neo-tree.nvim (map of filesystem) - https://github.com/christoomey/vim-tmux-navigator (tmux integration) -#### Old plugins +### LSP plugins +- https://github.com/williamboman/mason.nvim (lsp manager) +- https://github.com/williamboman/mason-lspconfig.nvim (messenger) +- https://github.com/neovim/nvim-lspconfig (neovim side) + +- https://github.com/LuaLS/lua-language-server (lua lsp) +- html-lsp over mason +- https://github.com/artempyanykh/marksman (markdown lsp) +- https://github.com/typescript-language-server/typescript-language-server (javascript and typescript lsp) + +### Old plugins - https://github.com/catppuccin/nvim?tab=readme-ov-file (colour scheme) -### Tutorials used +## Tutorials used - [YT - typecraft serie](https://www.youtube.com/watch?v=zHTeCSVAFNY&list=PLsz00TDipIffreIaUNk64KxTIkQaGguqn) - [Primegeon](https://www.youtube.com/watch?v=w7i4amO_zaE&t=81s) ## Cool plugins to add + +### Cool plugins to study - https://github.com/epwalsh/obsidian.nvim (Obsidian in Nvim) - https://github.com/Feel-ix-343/markdown-oxide?tab=readme-ov-file (lsp that makes Obsidian from .md) -### Tutorials foud +## Tutorials foud ## Ideas to do -- multiple buffers open in one widnow +- multiple buffers open in one widnow (posible with vim "+v") - move lualine on the top diff --git a/init.lua b/init.lua index cddcafc..c44c0ed 100644 --- a/init.lua +++ b/init.lua @@ -13,16 +13,12 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Configuration of plugins -- - -local opts = {} - -- Runs plugins -- require("lazy").setup("plugins") -- packet manager -- -local builtin = require("telescope.builtin") -- fuzzy finder -- +-- local builtin = require("telescope.builtin") -- fuzzy finder -- local config = require("nvim-treesitter.configs") -- tree sitter plugin config for langs -- config.setup({ @@ -34,7 +30,7 @@ config.setup({ highlight = { enable = true }, indent = { enable = true }, }) - + require("everforest").setup({}) --color scheme vim.cmd.colorscheme "everforest" @@ -49,8 +45,6 @@ require('lualine').setup{ -- Keypams -- -vim.keymap.set('n', '', builtin.find_files, {}) -- telescope find --- vim.keymap.set('n', '', builtin.live_grep, {}) -- I dont know what this is doing? vim.keymap.set('n', '', ':Neotree filesystem toggle left', {}) diff --git a/lazy-lock.json b/lazy-lock.json index f6c6c9c..398b0ea 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,16 +1,13 @@ { "everforest": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, - "image.nvim": { "branch": "master", "commit": "301de7919b2c0378cb7a782663f67abbcb198b17" }, "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, - "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, "nvim-lspconfig": { "branch": "master", "commit": "ed8b8a15acc441aec669f97d75f2c1f2ac8c8aa5" }, - "nvim-treesitter": { "branch": "master", "commit": "ea4f6d5175812a3f48302d638a766bc18fcbb04a" }, "nvim-web-devicons": { "branch": "master", "commit": "31ba3c489e56a7f20881cee013cea1269b6b2f2d" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, "vim-tmux-navigator": { "branch": "master", "commit": "a26954a585b02a2ac02f87145e204f8798a7cbc2" } } \ No newline at end of file diff --git a/lua/plugins/basic.lua b/lua/plugins/basic.lua index 9b92797..872be31 100644 --- a/lua/plugins/basic.lua +++ b/lua/plugins/basic.lua @@ -1,8 +1,5 @@ return { - {'nvim-telescope/telescope.nvim', tag = '0.1.6', -- fuzzy finder (telescope) -- - dependencies = { 'nvim-lua/plenary.nvim' }}, - {"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"}, -- tree sitter -- {"nvim-neo-tree/neo-tree.nvim",branch = "v3.x", -- map of filesystem diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 813ddb9..fac387a 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -8,15 +8,24 @@ return { {"williamboman/mason-lspconfig.nvim", -- mason configuration lsp config = function() require("mason-lspconfig").setup({ - ensure_installed = { "lua_ls" } + ensure_installed = { "lua_ls", + "tsserver", "html", + "marksman"} }) end }, - {"neovim/nvim-lspconfig", + {"neovim/nvim-lspconfig", -- nvim vrstva ktera implemetuje zmeny config = function() local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup({}) + lspconfig.lua_ls.setup({}) -- lua + lspconfig.marksman.setup({}) + lspconfig.tsserver.setup({}) -- js + lspconfig.html.setup({}) -- html + + vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) + vim.keymap.set({'n', 'v'}, 'ca', vim.lsp.buf.code_action, opts) end } } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..710d0e8 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-telescope/telescope-ui-select.nvim", + }, + { + "nvim-telescope/telescope.nvim", + tag = "0.1.5", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("telescope").setup({ + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown({}), + }, + }, + }) + local builtin = require("telescope.builtin") + vim.keymap.set("n", "", builtin.find_files, {}) + vim.keymap.set("n", "fg", builtin.live_grep, {}) + vim.keymap.set("n", "", builtin.oldfiles, {}) + + require("telescope").load_extension("ui-select") + end, + }, +}