update commentstring package, add biome config

This commit is contained in:
Siddhartha 2023-12-01 09:46:49 +05:30
parent 360d6365e6
commit c1c69a7111
6 changed files with 52 additions and 41 deletions

View File

@ -66,7 +66,6 @@ return require('packer').startup({
require('macbook.plugins.treesitter')
end,
},
{ 'nvim-treesitter/playground', after = 'nvim-treesitter' },
{ 'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter' },
{ 'nvim-treesitter/nvim-treesitter-refactor', after = 'nvim-treesitter' },
{ 'windwp/nvim-ts-autotag', after = 'nvim-treesitter' },
@ -77,14 +76,6 @@ return require('packer').startup({
-- Editor UI Niceties --
--------------------------
use({
'lukas-reineke/indent-blankline.nvim',
event = 'BufRead',
config = function()
require('macbook.plugins.indentline')
end,
})
use({
'norcalli/nvim-colorizer.lua',
event = 'CursorHold',
@ -145,7 +136,7 @@ return require('packer').startup({
-- Quickly move to any word in the file
use({
'phaazon/hop.nvim',
'smoka7/hop.nvim',
event = 'BufRead',
config = function()
require('macbook.plugins.hop')
@ -228,5 +219,14 @@ return require('packer').startup({
end,
})
-- LSP plugin for flutter ecosystem
use({
'akinsho/flutter-tools.nvim',
requires = {
'nvim-lua/plenary.nvim',
'stevearc/dressing.nvim', -- This improves the default vim.ui interfaces
},
})
end,
})

View File

@ -40,6 +40,18 @@ vim.diagnostic.config({
},
})
-- Astro
-- lsp.astro.setup {
-- init_options = {
-- on_attach = on_attach,
-- capabilities = capabilities,
-- configuration = {},
-- typescript = {
-- tsdk = vim.fs.normalize('/usr/local/lib/node_modules/typescript/lib')
-- }
-- }
-- }
---List of the LSP server that don't need special configuration
-- NOTE: Using `eslint_d` via `null-ls` bcz it is way fasterrrrrrr.
local servers = {
@ -50,6 +62,9 @@ local servers = {
'cssls', -- CSS
'jsonls', -- Json
'yamlls', -- YAML
'astro', -- astro
'gopls', -- golang
'biome' -- biome formatter
-- 'emmet_ls', -- emmet-ls
-- 'terraformls', -- Terraform
}

View File

@ -20,6 +20,7 @@ require('nvim-treesitter.configs').setup({
'css',
'json',
'bash',
'graphql'
},
highlight = {
enable = false, -- TODO: setting this to true caused huge performance lag on typescript files
@ -123,8 +124,4 @@ require('nvim-treesitter.configs').setup({
highlight_definitions = { enable = true },
-- highlight_current_scope = { enable = false },
},
context_commentstring = {
enable = true,
enable_autocmd = false,
},
})

View File

@ -0,0 +1,3 @@
require('ts_context_commentstring').setup({
enable_autocmd = false
})

View File

@ -19,12 +19,12 @@ o.signcolumn = 'auto'
o.cursorline = true -- highlight entire cursor line, increases readability
-- Better editing experience
o.expandtab = true
o.expandtab = false -- setting this to true will insert spaces when pressed tab
o.smarttab = true
o.cindent = true
o.autoindent = true
o.wrap = true
o.textwidth = 300
o.textwidth = 100
o.tabstop = 4
o.shiftwidth = 4
o.softtabstop = -1 -- if negative, shiftwidth value is used
@ -58,3 +58,6 @@ o.jumpoptions = 'view'
-- Map <leader> to space
g.mapleader = ' '
g.maplocalleader = ' '
-- Smooth scrolling
o.smoothscroll = true

View File

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end
time([[Luarocks path setup]], true)
local package_path_str = "/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
local package_path_str = "/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?.lua;/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.1700008891/share/lua/5.1/?/init.lua;/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?.lua;/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.1700008891/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/Users/siddhartha/.cache/nvim/packer_hererocks/2.1.1700008891/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
@ -123,6 +123,11 @@ _G.packer_plugins = {
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["dressing.nvim"] = {
loaded = true,
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/start/dressing.nvim",
url = "https://github.com/stevearc/dressing.nvim"
},
["fidget.nvim"] = {
config = { "\27LJ\2\n4\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\vfidget\frequire\0" },
load_after = {
@ -133,6 +138,11 @@ _G.packer_plugins = {
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/opt/fidget.nvim",
url = "https://github.com/j-hui/fidget.nvim"
},
["flutter-tools.nvim"] = {
loaded = true,
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/start/flutter-tools.nvim",
url = "https://github.com/akinsho/flutter-tools.nvim"
},
["friendly-snippets"] = {
loaded = false,
needs_bufread = false,
@ -162,15 +172,7 @@ _G.packer_plugins = {
needs_bufread = false,
only_cond = false,
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/opt/hop.nvim",
url = "https://github.com/phaazon/hop.nvim"
},
["indent-blankline.nvim"] = {
config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31macbook.plugins.indentline\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim",
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
url = "https://github.com/smoka7/hop.nvim"
},
["lualine.nvim"] = {
after = { "fidget.nvim" },
@ -209,7 +211,7 @@ _G.packer_plugins = {
url = "https://github.com/windwp/nvim-autopairs"
},
["nvim-cmp"] = {
after = { "cmp_luasnip", "cmp-buffer", "nvim-autopairs", "cmp-path" },
after = { "nvim-autopairs", "cmp-buffer", "cmp-path", "cmp_luasnip" },
config = { "\27LJ\2\n<\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0!macbook.plugins.lsp.nvim-cmp\frequire\0" },
loaded = false,
needs_bufread = false,
@ -242,7 +244,7 @@ _G.packer_plugins = {
url = "https://github.com/nvim-tree/nvim-tree.lua"
},
["nvim-treesitter"] = {
after = { "nvim-treesitter-refactor", "nvim-ts-autotag", "nvim-treesitter-textobjects", "playground", "nvim-ts-context-commentstring" },
after = { "nvim-ts-autotag", "nvim-ts-context-commentstring", "nvim-treesitter-refactor", "nvim-treesitter-textobjects" },
config = { "\27LJ\2\n:\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\31macbook.plugins.treesitter\frequire\0" },
loaded = false,
needs_bufread = false,
@ -296,15 +298,6 @@ _G.packer_plugins = {
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
playground = {
load_after = {
["nvim-treesitter"] = true
},
loaded = false,
needs_bufread = true,
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/opt/playground",
url = "https://github.com/nvim-treesitter/playground"
},
["plenary.nvim"] = {
loaded = true,
path = "/Users/siddhartha/.local/share/nvim/site/pack/packer/start/plenary.nvim",
@ -349,12 +342,12 @@ vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Event lazy-loads
time([[Defining lazy-load event autocommands]], true)
vim.cmd [[au BufEnter * ++once lua require("packer.load")({'lualine.nvim'}, { event = "BufEnter *" }, _G.packer_plugins)]]
vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'nvim-cmp', 'LuaSnip'}, { event = "InsertEnter *" }, _G.packer_plugins)]]
vim.cmd [[au CursorHold * ++once lua require("packer.load")({'nvim-treesitter', 'friendly-snippets', 'nvim-colorizer.lua', 'telescope.nvim', 'nvim-tree.lua'}, { event = "CursorHold *" }, _G.packer_plugins)]]
vim.cmd [[au BufEnter * ++once lua require("packer.load")({'lualine.nvim'}, { event = "BufEnter *" }, _G.packer_plugins)]]
vim.cmd [[au WinScrolled * ++once lua require("packer.load")({'neoscroll.nvim'}, { event = "WinScrolled *" }, _G.packer_plugins)]]
vim.cmd [[au CursorHold * ++once lua require("packer.load")({'telescope.nvim', 'friendly-snippets', 'nvim-colorizer.lua', 'nvim-tree.lua', 'nvim-treesitter'}, { event = "CursorHold *" }, _G.packer_plugins)]]
vim.cmd [[au InsertCharPre * ++once lua require("packer.load")({'nvim-autopairs'}, { event = "InsertCharPre *" }, _G.packer_plugins)]]
vim.cmd [[au BufRead * ++once lua require("packer.load")({'gitsigns.nvim', 'null-ls.nvim', 'git-messenger.vim', 'nvim-lspconfig', 'indent-blankline.nvim', 'hop.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]]
vim.cmd [[au BufRead * ++once lua require("packer.load")({'null-ls.nvim', 'git-messenger.vim', 'hop.nvim', 'gitsigns.nvim', 'nvim-lspconfig'}, { event = "BufRead *" }, _G.packer_plugins)]]
time([[Defining lazy-load event autocommands]], false)
vim.cmd("augroup END")