aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2025-08-23 10:40:16 +0200
committerSimen A. W. Olsen <hello@simenandre.no>2025-08-23 10:40:16 +0200
commit9ae165fa0d8cd1ecc433026642484c167c3e0b88 (patch)
treee9872ffa19a8a002a544c025d0f70ea8120e6c32
parent807903b91c013b56e77f9f70758bd137e42cbb65 (diff)
downloadconfig.nvim-9ae165fa0d8cd1ecc433026642484c167c3e0b88.tar.gz
config.nvim-9ae165fa0d8cd1ecc433026642484c167c3e0b88.zip
update plugins setup
-rw-r--r--lua/simenandre/plugins/ai.lua12
-rw-r--r--lua/simenandre/plugins/copilot.lua3
-rw-r--r--lua/simenandre/plugins/lsp.lua26
-rw-r--r--lua/simenandre/plugins/telescope.lua21
-rw-r--r--lua/simenandre/plugins/treesitter.lua72
5 files changed, 94 insertions, 40 deletions
diff --git a/lua/simenandre/plugins/ai.lua b/lua/simenandre/plugins/ai.lua
new file mode 100644
index 0000000..3d66fb6
--- /dev/null
+++ b/lua/simenandre/plugins/ai.lua
@@ -0,0 +1,12 @@
+return {
+ "github/copilot.vim",
+ {
+ "greggh/claude-code.nvim",
+ dependencies = {
+ "nvim-lua/plenary.nvim", -- Required for git operations
+ },
+ config = function()
+ require("claude-code").setup()
+ end,
+ },
+}
diff --git a/lua/simenandre/plugins/copilot.lua b/lua/simenandre/plugins/copilot.lua
deleted file mode 100644
index 0cf3a34..0000000
--- a/lua/simenandre/plugins/copilot.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-return {
- "github/copilot.vim",
-}
diff --git a/lua/simenandre/plugins/lsp.lua b/lua/simenandre/plugins/lsp.lua
index 4f81fb9..8853310 100644
--- a/lua/simenandre/plugins/lsp.lua
+++ b/lua/simenandre/plugins/lsp.lua
@@ -26,6 +26,9 @@ return {
-- Allows extra capabilities provided by nvim-cmp
"saghen/blink.cmp",
},
+ opts = {
+ inlay_hints = { enabled = true },
+ },
config = function()
-- Brief aside: **What is LSP?**
--
@@ -170,7 +173,23 @@ return {
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
- gopls = {},
+ gopls = {
+ settings = {
+ gopls = {
+ symbolMatcher = "fuzzy",
+ symbolStyle = "dynamic",
+ hints = {
+ rangeVariableTypes = true,
+ parameterNames = true,
+ constantValues = true,
+ assignVariableTypes = true,
+ compositeLiteralFields = true,
+ compositeLiteralTypes = true,
+ functionTypeParameters = true,
+ },
+ },
+ },
+ },
zls = {
root_dir = require("lspconfig.util").root_pattern(".git", "build.zig", "zls.json"),
settings = {
@@ -191,6 +210,7 @@ return {
-- But for many setups, the LSP (`ts_ls`) will work just fine
ts_ls = {},
--
+ astro = {},
lua_ls = {
-- cmd = {...},
@@ -198,6 +218,10 @@ return {
-- capabilities = {},
settings = {
Lua = {
+ hint = {
+ enable = true, -- necessary
+ },
+ enable_inlay_hints = true,
completion = {
callSnippet = "Replace",
},
diff --git a/lua/simenandre/plugins/telescope.lua b/lua/simenandre/plugins/telescope.lua
index 4df7e62..313a4ed 100644
--- a/lua/simenandre/plugins/telescope.lua
+++ b/lua/simenandre/plugins/telescope.lua
@@ -49,11 +49,19 @@ return {
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
- -- defaults = {
- -- mappings = {
- -- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
- -- },
- -- },
+ defaults = {
+ mappings = {
+ n = {
+ ["<c-x>"] = require("telescope.actions").delete_buffer,
+ ["<delete>"] = require("telescope.actions").delete_buffer,
+ }, -- n
+ i = {
+ ["<C-h>"] = "which_key",
+ ["<c-x>"] = require("telescope.actions").delete_buffer,
+ ["<delete>"] = require("telescope.actions").delete_buffer,
+ }, -- i
+ },
+ },
-- pickers = {}
extensions = {
["ui-select"] = {
@@ -72,6 +80,9 @@ return {
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
+
+ vim.keymap.set("n", "<leader>st", builtin.treesitter, { desc = "[S]earch [T]reesitter" })
+
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
diff --git a/lua/simenandre/plugins/treesitter.lua b/lua/simenandre/plugins/treesitter.lua
index 4a8ac11..77f617d 100644
--- a/lua/simenandre/plugins/treesitter.lua
+++ b/lua/simenandre/plugins/treesitter.lua
@@ -4,36 +4,46 @@ return {
build = ":TSUpdate",
main = "nvim-treesitter.configs", -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
- opts = {
- ensure_installed = {
- "bash",
- "c",
- "diff",
- "html",
- "lua",
- "luadoc",
- "markdown",
- "markdown_inline",
- "query",
- "vim",
- "vimdoc",
- },
- -- Autoinstall languages that are not installed
- auto_install = true,
- highlight = {
- enable = true,
- -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
- -- If you are experiencing weird indenting issues, add the language to
- -- the list of additional_vim_regex_highlighting and disabled languages for indent.
- additional_vim_regex_highlighting = { "ruby" },
- },
- indent = { enable = true, disable = { "ruby" } },
- },
- -- There are additional nvim-treesitter modules that you can use to interact
- -- with nvim-treesitter. You should go explore a few and see what interests you:
- --
- -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
- -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
- -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
+ config = function()
+ require("nvim-treesitter.configs").setup({
+ ensure_installed = {
+ "bash",
+ "ssh_config",
+ "c",
+ "diff",
+ "html",
+ "css",
+ "gitcommit",
+ "gitignore",
+ "lua",
+ "luadoc",
+ "go",
+ "json",
+ "javascript",
+ "rust",
+ "zig",
+ "yaml",
+ "toml",
+ "tsx",
+ "typescript",
+ "markdown",
+ "markdown_inline",
+ "query",
+ "vim",
+ "vimdoc",
+ "astro",
+ },
+ -- Autoinstall languages that are not installed
+ auto_install = true,
+ highlight = {
+ enable = true,
+ -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
+ -- If you are experiencing weird indenting issues, add the language to
+ -- the list of additional_vim_regex_highlighting and disabled languages for indent.
+ additional_vim_regex_highlighting = { "ruby" },
+ },
+ indent = { enable = true, disable = { "ruby" } },
+ })
+ end,
},
}